home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Periodicals / CSMP / C.S.M.P. Digest, Issue 3.029 < prev    next >
Internet Message Format  |  1994-06-09  |  163KB

  1. From: pottier@clipper.ens.fr (Francois Pottier)
  2. Subject: csmp-digest-v3-029
  3. Date: Sun, 22 May 94 23:09:20 MET DST
  4.  
  5. C.S.M.P. Digest             Sun, 22 May 94       Volume 3 : Issue 29
  6.  
  7. Today's Topics:
  8.  
  9.         64-bit multiply & divide for line intersections...?
  10.         A KON&BAL Puzzle Page of my own
  11.         Absoft C++
  12.         Absoft on Power Mac
  13.         Another BlockMove question
  14.         Async Disk Access
  15.         ExtFS Development
  16.         Help w- PPC and Time Tasks
  17.         How To Detect Screen Saver
  18.         Large device drivers: how to?
  19.         Taxes on shareware fees
  20.         Thread Mgr Native PPC NOT - why?
  21.         updated list of bizarre key combos on the mac
  22.  
  23.  
  24.  
  25. The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
  26. (pottier@clipper.ens.fr).
  27.  
  28. The digest is a collection of article threads from the internet newsgroup
  29. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  30. regularly and want an archive of the discussions.  If you don't know what a
  31. newsgroup is, you probably don't have access to it.  Ask your systems
  32. administrator(s) for details.  If you don't have access to news, you may
  33. still be able to post messages to the group by using a mail server like
  34. anon.penet.fi (mail help@anon.penet.fi for more information).
  35.  
  36. Each issue of the digest contains one or more sets of articles (called
  37. threads), with each set corresponding to a 'discussion' of a particular
  38. subject.  The articles are not edited; all articles included in this digest
  39. are in their original posted form (as received by our news server at
  40. nef.ens.fr).  Article threads are not added to the digest until the last
  41. article added to the thread is at least two weeks old (this is to ensure that
  42. the thread is dead before adding it to the digest).  Article threads that
  43. consist of only one message are generally not included in the digest.
  44.  
  45. The digest is officially distributed by two means, by email and ftp.
  46.  
  47. If you want to receive the digest by mail, send email to listserv@ens.fr
  48. with no subject and one of the following commands as body:
  49.     help                        Sends you a summary of commands
  50.     subscribe csmp-digest Your Name    Adds you to the mailing list
  51.     signoff csmp-digest            Removes you from the list
  52. Once you have subscribed, you will automatically receive each new
  53. issue as it is created.
  54.  
  55. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
  56. Questions related to the ftp site should be directed to
  57. scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP
  58. digest are available there.
  59.  
  60. Also, the digests are available to WAIS users as comp.sys.mac.programmer.src.
  61.  
  62.  
  63. -------------------------------------------------------
  64.  
  65. >From dmc@leland.Stanford.EDU (David M. Cannon)
  66. Subject: 64-bit multiply & divide for line intersections...?
  67. Date: 3 May 1994 03:05:32 GMT
  68. Organization: Stanford University, CA 94305, USA
  69.  
  70.  
  71. I've been trying to adapt some of the code from Graphics Gems for use
  72. on some simple mac graphics that I'm doing.  In particular, I'm working
  73. to get some of the line-intersection code to work for Quickdraw's
  74. graphic space, signed 16-bit integers in each direction.  To do this,
  75. I need routines which will multiply 2 32-bit integers to get a 64 bit
  76. signed integer, and then to divide that 64-bit integer by a 32 bit
  77. signed integer.  There is a 64-bit multiply in the GG code, but it
  78. appears to be designed for intel chips (?), and my attempts to modify
  79. it don't weem to work for signed integers; my divde routine is even
  80. more pathetic.  I have a feeling that code to do this stuff is out there
  81. somewhere sitting on an ftp server or someone's disk; anyone have any
  82. working code or pointers to such?  I've already resigned myself to
  83. acknowledging my mediocrity as a programmer after several hours at this
  84. today... surely better people have found this easy... :-/
  85.  
  86. Thanks,
  87.  
  88. Dave Cannon
  89. PLEASE REPLY TO:
  90. dmcannon@step.stanford.edu
  91.  
  92. +++++++++++++++++++++++++++
  93.  
  94. >From platypus@cirrus.som.cwru.edu (Gary Kacmarcik)
  95. Date: 03 May 1994 19:47:23 GMT
  96. Organization: Case Western Reserve University, Cleveland, Ohio (USA)
  97.  
  98.  
  99. In article <2q4f1s$3n0@nntp2.Stanford.EDU> dmc@leland.Stanford.EDU (David M. Cannon) writes:
  100.  
  101. > I've been trying to adapt some of the code from Graphics Gems for use
  102. > on some simple mac graphics that I'm doing.  In particular, I'm working
  103. > to get some of the line-intersection code to work for Quickdraw's
  104. > graphic space, signed 16-bit integers in each direction.  To do this,
  105. > I need routines which will multiply 2 32-bit integers to get a 64 bit
  106. > signed integer, and then to divide that 64-bit integer by a 32 bit
  107. > signed integer.  There is a 64-bit multiply in the GG code, but it
  108.  
  109. i wrote the following a while ago, and haven't had problems with it.
  110. on the other hand, i haven't tested it fully.  make sure that you 
  111. understand the code before you add it to any program that involves
  112. life-support ;-)
  113.  
  114. the mult64 (64-bit = 32 x 32) and mult128 (128 = 64 x 64) code is commented
  115. fairly well, but the divide code leaves a bit to be desired.
  116.  
  117. note that if your compiler supports 64-bit data types, you should use them.
  118. the PowerPC can do a 64=32x32 in 2 instructions (mullw and mulhw[u]), and
  119. 64-bit PowerPC's (like the 620) will be able to do 128=64x64 in two
  120. instructions (mulld and mulhd[u]).
  121.  
  122. enjoy
  123.  
  124. -gary j kacmarcik
  125. platypus@nimbus.som.cwru.edu
  126.  
  127.  
  128. tabs should be set to 4 or else the code will look uglier than necessary.
  129. the code assumes the following typedefs:
  130.  
  131. typedef short int16;
  132. typedef long int32;
  133.  
  134. typedef unsigned char uchar;
  135. typedef unsigned short uint16;
  136. typedef unsigned long uint32;
  137.  
  138. typedef struct {
  139.     uint32    u,l;
  140.     } int64,uint64;
  141.  
  142. typedef struct {
  143.     uint32    uu,ul,lu,ll;
  144.     } int128,uint128;
  145.     
  146.  
  147. // **************
  148. // MULTIPLICATION
  149. // **************
  150.  
  151. // on a computer with 2n bits in a standard word, multiplying 2 2n-bit words has
  152. // the potential of overflowing the output word -- 4n bits are required to
  153. // guarantee that the result can be stored without overflow.
  154. //
  155. // the only way to insure that the result can be stored in a single word
  156. // is to limit the range of numbers that can be multiplied.  thus, if you
  157. // only allow numbers with n bits (or less) to be multiplied, you can guarantee
  158. // that the result will fit in a 2n-bit word.
  159. //
  160. // multiplying 2 2n-bit words can be accomplished by breaking up the 2n-bit x
  161. // 2n-bit multiply into a series of n-bit x n-bit multiplies.  this is good
  162. // because we know that the n x n bit multiplies will not cause an overflow.
  163. //
  164. // the process is the same as that used when multiplying numbers by hand.  e.g.:
  165. //
  166. //             9 3
  167. //           x 2 5
  168. //           -----
  169. //             1 5   = 5 x 3
  170. //           4 5     = 5 x 9 (shifted over to the 10's place)
  171. //           0 6     = 2 x 3 (shifted over to the 10's place)
  172. //         1 8       = 2 x 9 (shifted over to the 100's place)
  173. //         -------
  174. //         2 3 2 5
  175. //
  176. // the results of the individual multiplies are shifted over the appropriate
  177. // number of places and then added together
  178. //
  179. // this can be formalized as follows:
  180. //
  181. //     to multiply 2 2n-bit numbers u and v
  182. //          
  183. //          u = 2^n U1 + U0
  184. //          v = 2^n V1 + V0
  185. //       ------------------
  186. //      u * v = 2^2n U1 V1  +  2^n V1 U0  +  2^n U1 V0  +  U0 V0
  187. //
  188. // U1 and U0 can be thought of as the upper-half and the lower-half of u.
  189. // likewise with v.  the following figure shows the above formula graphically.
  190. // each block is n bits wide.
  191. //
  192. //                        +--------+--------+
  193. //                   u =  |   U1   |   U0   |
  194. //                        +--------+--------+
  195. //                        +--------+--------+
  196. //               *   v =  |   V1   |   V0   |
  197. //                        +--------+--------+
  198. //     ---------------------------------------
  199. //                        +--------+--------+
  200. //                        |      U0 V0      |
  201. //                        +--------+--------+
  202. //               +--------+--------+
  203. //               |      U1 V0      |            (shifted over n bits)
  204. //               +--------+--------+
  205. //               +--------+--------+
  206. //               |      V1 U0      |            (shifted over n bits)
  207. //               +--------+--------+
  208. //      +--------+--------+
  209. //      |      U1 V1      |                     (shifted over 2n bits)
  210. //      +--------+--------+
  211. //     ---------------------------------------
  212. //      +--------+--------+--------+--------+
  213. //      |               u * v               |
  214. //      +--------+--------+--------+--------+
  215. //
  216. // since a 2n-bit unit is that largest unit that we can deal with at a time, we
  217. // need to break the 2 middle terms (U1V0 and V1U0) into upper and lower halves
  218. // and then add the appropriate half to appropriate half of the result.  thus,
  219. // we need to take the lower n bits of the U1V0 term, shift them n bits to the
  220. // left, and add them to the lower 2n-bit half of the result term.  then we take
  221. // the upper n bits, shift them n bits to the left, and add them to the upper
  222. // 2n-bit half of the result term.  repeat for the V1U0 term.
  223. //
  224. // note that this requires 4 multiplies and 4 additions
  225. //
  226. // the above formula can be simplified to reduce the number of multiplies required
  227. // (at the expense of adding a few additions/subtractions)
  228. //
  229. //      u * v = 2^2n U1 V1  +  2^n V1 U0  +  2^n U1 V0  +  U0 V0
  230. //
  231. // adding  2^n U1 V1  -  2^n U1 V1  +  2^n U0 V0  -  2^n U0 V0  (which is the same
  232. // as adding 0)
  233. //
  234. //      u * v = (2^2n + 2^n) U1 V1  +  2^n (U1 - U0) (V1 - V0)  +  (2^n + 1) U0 V0
  235. //
  236. // or
  237. //      u * v = 2^2n U1 V1  +  2^n (U1 V1 + (U1-U0)(V1-V0) + U0V0)  +  U0 V0
  238. //
  239. // which requires 3 multiplies and 8 additions/subtractions (2 subtractions and
  240. // each middle (ie: 2^n) term requires 2 additions)
  241. //
  242. // the elimination of one of the multiplications can have a significant impact on
  243. // the performance depending on how many times this algorithm needs to be applied
  244. // recursively in order to obtain the desired multiplication operation.  the
  245. // following table
  246. //
  247. //   # of times          original         reduced
  248. //     applied            method           method
  249. //   recursively        *       +        *       +/-
  250. //  ------------------------------------------------
  251. //        1             4       4        3        8
  252. //        2            16      20        9       32
  253. //        3            64      84       27       96
  254. //        4           256     340       81      296
  255. //
  256. // it is obvious that the reduced method performs better than the original method
  257. // if we need to apply the algorithm more than 3 times recursively.  for the
  258. // other cases, we need to take into account the relative performance of the
  259. // multiply verses the addition operation.
  260. //
  261. //   for level  1  we replaced   1  multiply   with   4  add/sub's
  262. //   for level  2  we replaced   5  multiplies with  12  add/sub's
  263. //   for level  3  we replaced  37  multiplies with  12  add/sub's
  264. //
  265. // since multiplication requires more computation time that addition/subtraction,
  266. // the reduced method is advantageous for level 3.  for level 2, the reduced
  267. // method is advantageous if the average multiply requires more than 12/5 the
  268. // time of an add/subtract.  the reduced method is advantageous for level 1
  269. // if a multiply requires at least 4 times as much time as an add/subtract.
  270. //
  271. // in general, it is good to apply the reduced method.
  272. //
  273. // for more info: "The Art of Computer Programming, Volume II: Seminumerical
  274. // Algorithms", by D.E. Knuth.
  275. //
  276. // whew!  now we can actually implement it...
  277.  
  278.  
  279. // we rely on the compiler to generate the 32-bit product of 2 16-bit integers
  280. // this should be a basic instruction
  281. #define    mult16(x,y)        (uint32)(((uint32)x) * ((uint32)y))
  282.  
  283.  
  284. // multiply 2 32-bit integers and return a 64 bit result
  285. // (13OCT93)
  286. uint64
  287. mult32(uint32 u,uint32 v)
  288.    {int32 u1,u0;
  289.     int32 v1,v0;
  290.     int32 u1v1,u0v0,u1u0_v1v0,t;
  291.     int32 r1,r0;
  292.     int64 result;
  293.     
  294.     u1 = (u >> 16) & 0x0000FFFF;
  295.     u0 = u & 0x0000FFFF;
  296.     v1 = (v >> 16) & 0x0000FFFF;
  297.     v0 = v & 0x0000FFFF;
  298.     
  299.     u0v0 = mult16(u0,v0);
  300.     u1v1 = mult16(u1,v1);
  301.     u1u0_v1v0 = mult16((u1-u0),(v1-v0));
  302.     
  303.     r0 = u0v0;
  304.     r1 = u1v1;
  305.     
  306.     // take upper half on middle terms, shift them to the right, and add them
  307.     // to the lower part of the upper half of the result
  308.     t = (u1v1 >> 16) & 0x0000FFFF;
  309.     r1 += t;
  310.     t = (u0v0 >> 16) & 0x0000FFFF;
  311.     r1 += t;
  312.     t = (u1u0_v1v0 >> 16) & 0x0000FFFF;
  313.     r1 += t;
  314.     
  315.     // take lower half on middle terms, shift them to the left, and add them
  316.     // to the upper part of the lower half of the result
  317.     t = (u1v1 << 16) & 0xFFFF0000;
  318.     r0 += t;
  319.     t = (u0v0 << 16) & 0xFFFF0000;
  320.     r0 += t;
  321.     t = (u1u0_v1v0 << 16) & 0xFFFF0000;
  322.     r0 += t;
  323.         
  324.     result.u = r1;
  325.     result.l = r0;
  326.     return(result);}
  327.  
  328.  
  329. // multiply 2 64-bit integers and return a 128 bit result
  330. // (13OCT93)
  331. uint128
  332. mult64(uint64 u,uint64 v)
  333.    {int128 result;
  334.  
  335.     int32 u1,u0;
  336.     int32 v1,v0;
  337.     int64 u1v1,u0v0,u1u0_v1v0,t;
  338.     int64 r1,r0;
  339.     
  340.     u1 = u.u;
  341.     u0 = u.l;
  342.     v1 = v.u;
  343.     v0 = v.l;
  344.     
  345.     u0v0 = mult32(u0,v0);
  346.     u1v1 = mult32(u1,v1);
  347.     u1u0_v1v0 = mult32((u1-u0),(v1-v0));
  348.     
  349.     r0 = u0v0;
  350.     r1 = u1v1;
  351.     
  352.     // take upper half on middle terms, and add them
  353.     // to the lower part of the upper half of the result
  354.     t.u = 0;
  355.     t.l = u1v1.u;
  356.     addto64(&r1,t);
  357.     t.l = u0v0.u;
  358.     addto64(&r1,t);
  359.     t.l = u1u0_v1v0.u;
  360.     addto64(&r1,t);
  361.     
  362.     // take lower half on middle terms, and add them
  363.     // to the upper part of the lower half of the result
  364.     t.l = 0;
  365.     t.u = u1v1.l;
  366.     addto64(&r0,t);
  367.     t.u = u0v0.l;
  368.     addto64(&r0,t);
  369.     t.u = u1u0_v1v0.l;
  370.     addto64(&r0,t);
  371.     
  372.     result.uu = r1.u;
  373.     result.ul = r1.l;
  374.     result.lu = r0.u;
  375.     result.ll = r0.l;
  376.  
  377.     return(result);}
  378.  
  379. // ********
  380. // DIVISION
  381. // ********
  382.  
  383. // divide a 64-bit number by a 32-bit number and return a 64-bit quotient
  384. // and a 32-bit remainder
  385. // this operation is:
  386. //    dividend / divisor
  387. // the return values are such that
  388. //    dividend = (divisor x quotient) + remainder
  389. // (09JUN93 - 13OCT93)
  390. void
  391. divide64(uint64 dividend, uint32 divisor,
  392.         uint64 *quotient, uint32 *remainder)
  393.    {int neg_divisor=0,neg_dividend=0;
  394.     uint32 mask,x;
  395.  
  396.     // check if the divisor is negative
  397.     if(divisor & SIGN)
  398.        {neg_divisor = 1;
  399.         // negate the 32-bit divisor so that we deal with + numbers
  400.         divisor = ~divisor + 1;}
  401.     
  402.     // check if the dividend is negative
  403.     if(dividend.u & SIGN)
  404.        {neg_dividend = 1;
  405.         negate64(÷nd);}
  406.         
  407.     // calculate the upper and lower parts of the quotient
  408.     // if the upper part is non-zero, we have an overflow condition
  409.     mask = SIGN;
  410.     x = 0;
  411.     quotient->u = 0;
  412.     while(mask)
  413.        {x <<= 1;
  414.         x += ((dividend.u & mask)?1:0);
  415.         quotient->u <<= 1;
  416.         if(divisor <= x)
  417.            {x -= divisor;
  418.             quotient->u |= 1;}
  419.         mask >>= 1;}
  420.     mask = SIGN;
  421.     quotient->l = 0;
  422.     while(mask)
  423.        {if(x & SIGN)
  424.            {// overflow
  425.             quotient->u = SIGN;
  426.             quotient->l = 0;
  427.             return;}
  428.         x <<= 1;
  429.         x += ((dividend.l & mask)?1:0);
  430.         quotient->l <<= 1;
  431.         if(divisor <= x)
  432.            {x -= divisor;
  433.             quotient->l |= 1;}
  434.         mask >>= 1;}
  435.     *remainder = x;
  436.     
  437.     // we need to make sure that the sign of the result makes sense
  438.     // the remainder should have the same sign as the dividend
  439.     if(neg_dividend && ((*remainder & SIGN) != SIGN))
  440.         *remainder = ~*remainder + 1;
  441.     if(neg_dividend != neg_divisor)
  442.         negate64(quotient);}
  443.  
  444. +++++++++++++++++++++++++++
  445.  
  446. >From Bruce@hoult.actrix.gen.nz (Bruce Hoult)
  447. Date: Thu, 5 May 1994 18:05:17 +1200 (NZST)
  448. Organization: (none)
  449.  
  450. dmc@leland.Stanford.EDU (David M. Cannon) writes:
  451. > I need routines which will multiply 2 32-bit integers to get a 64 bit
  452. > signed integer, and then to divide that 64-bit integer by a 32 bit
  453. > signed integer.  There is a 64-bit multiply in the GG code, but it
  454. > appears to be designed for intel chips (?), and my attempts to modify
  455. > it don't weem to work for signed integers; my divde routine is even
  456. > more pathetic.
  457.  
  458. The work of a moment, if you're running on a 68020 or better :-)
  459.  
  460. - --------------------- lm.a -----------------------
  461.     case on
  462.     machine mc68020
  463.     
  464. muldiv64 proc export  ; long muldiv64(long mul1, long mul2, long div)
  465.     move.l 4(sp),d0
  466.     muls.l 8(sp),d1:d0
  467.     divs.l 12(sp),d1:d0
  468.     rts
  469.     endproc
  470.     end
  471. - --------------------- test.c -----------------------
  472. #include <stdio.h>
  473.  
  474. long muldiv64(long mul1, long mul2, long div);
  475.  
  476. int main(){
  477.     long a,b,c;
  478.     scanf("%d %d %d",&a,&b,&c);
  479.     printf("%d\n", muldiv64(a,b,c));
  480.     return 0;
  481. }
  482. - -----------------------------------------------------
  483.  
  484. That's enough to let you build and test it in MPW (it works).
  485. Uhhh -- you don't say whether you wanted the quotient or the
  486. remainder from the division -- I assumed the quotient.  If you
  487. want the remainder then swap d0 with d1 everywhere.
  488.  
  489. The object code output from lm.a is...
  490.  
  491. 00000000: 202F 0004      ' /..'            MOVE.L     $0004(A7),D0
  492. 00000004: 4C2F 0C01 0008 'L/....'          MULS.L     $0008(A7),D1:D0
  493. 0000000A: 4C6F 0C01 000C 'Lo....'          DIVS.L     $000C(A7),D1:D0
  494. 00000010: 4E75           'Nu'              RTS        
  495.  
  496. ... so you could make a C inline something like this (not tested)...
  497.  
  498. long muldiv64(long mul1, long mul2, long div)
  499.    = {0x202F, 0x0004, 0x4C2F, 0x0C01, 0x0008, 0x4C6F, 0x0C01, 0x000C};
  500.  
  501.  
  502. Happy coding :-)
  503.  
  504. -- Bruce
  505.  
  506. ---------------------------
  507.  
  508. >From pottier@goelette.ens.fr (Francois Pottier)
  509. Subject: A KON&BAL Puzzle Page of my own
  510. Date: 28 Apr 1994 11:18:55 GMT
  511. Organization: Ecole Normale Superieure, PARIS, France
  512.  
  513.  
  514. I had a hell of a debugging session last night... I had to single-step
  515. through the Palette Manager in order to understand what was wrong with my
  516. code. After solving the problem I thought the story was amusing, so I turned
  517. it into a KON & BAL Puzzle Page. Here it is. I hope you like it...
  518.  
  519. [This puzzle is not as hard as usual KON&BAL ones... I apologize to the
  520.  real KON & BAL...]
  521.  
  522.  
  523. KON I have this cool application I'm writing which does some drawing in an
  524.     offscreen GWorld.
  525.         
  526. BAL Yeah, what about it?
  527.  
  528. KON Well, after I launch it, SetDepth becomes unreliable, and the machine
  529.     often crashes while trying to change the screen's pixel depth.
  530.         
  531. BAL You must have some slimy code in there mucking with Quickdraw's internals.
  532.  
  533. KON No, nothing of the sort, I just create an offscreen GWorld, draw a picture
  534.     into it and CopyBits it to the screen. Really innocuous.
  535.         
  536. BAL Okay, where does the crash occur ?
  537.  
  538. KON Always in the same place, somewhere in the System Heap. Must be the Layer
  539.     Manager or the Palette Manager or something. The code crashes with a bus
  540.     error because A4 contains an invalid pointer.
  541.         
  542. BALOkay, let's disassemble around the place and figure where the value in A4
  543.     comes from.
  544.         
  545. KON Apparently it comes from an array which was obtained from a low
  546.     memory global named PortList.
  547.         
  548. BAL PortList? Never heard of that one. We're lucky that Macsbug knows its
  549.     name. It's probably a list of all open grafports.
  550.         
  551. KON Yeah, SetDepth must be walking all ports and changing a few things in them.
  552.  
  553. BAL Fine. Let's have a look at the port that was being checked when the machine
  554.     crashed. Typing 'dm <addr> CGrafPort' will tell us lots of things about it.
  555.         
  556. KON Hey, that's one of my GWorlds! I recognize its bounds rect. That's funny, I
  557.     thought I had disposed of it, what's it doing in the port list?
  558.         
  559. BAL Hmm, exactly how did you dispose of it?
  560.  
  561. KON Well, I came up with a super KON kluge. All of my objects are allocated
  562.     within a custom heap zone created with InitZone. This way I don't need to
  563.     free individual blocks, I just DisposeHandle the whole zone and I'm done.
  564.         
  565. BAL Yech.
  566.  
  567. KON Oh, it works fine, I never had a single memory leak.
  568.  
  569. BAL Sure, but you can't kill a GWorld this way. It actually releases the
  570.     memory, but since Quickdraw doesn't know about it, you're left with a
  571.     stale pointer in the port list. That's why your code crashes. Just call
  572.     DisposeGWorld properly before zapping your custom heap.
  573.         
  574. KON Oops - nasty.
  575.  
  576. BAL Yeah.
  577.  
  578. -- 
  579. Francois Pottier
  580. pottier@dmi.ens.fr
  581.  
  582. +++++++++++++++++++++++++++
  583.  
  584. >From Bruce_Burkhalter@inetlink.berksys.com (Bruce Burkhalter)
  585. Date: 29 Apr 1994 16:28:23 GMT
  586. Organization: Berkeley Systems
  587.  
  588. In article <2po62v$b0m@nef.ens.fr>, pottier@goelette.ens.fr (Francois
  589. Pottier) wrote:
  590.  
  591. > KON Well, I came up with a super KON kluge. All of my objects are allocated
  592. >     within a custom heap zone created with InitZone. This way I don't need to
  593. >     free individual blocks, I just DisposeHandle the whole zone and I'm done.
  594.  
  595. This is on ok thing to do but you have to be really careful about what get
  596. allocated in it.  If you are set to the heap and you do font stuff then
  597. some font related structures and resources will get loaded into it.  When
  598. you nuke the heap things get flaky.  We just had a problem with with
  599. PlotSuiteIcon() calling ReallocHandle() into our heap and when we nuked the
  600. heap all the icons on the desktop would go weird.
  601.  
  602. The reason to create a heap like this is not so you don't have to free
  603. individual blocks.  That is just sloppy programming.  We use it for
  604. allocating MultiFinder temp mem and turning it into a heap so we can use
  605. standard memory manager and resource calls with temp mem.
  606.  
  607. -- 
  608. Bruce Burkhalter
  609. Bruce_Burkhalter@inetlink.berksys.com
  610. All opinions are mine.
  611. Berkeley Systems Inc.
  612.  
  613. +++++++++++++++++++++++++++
  614.  
  615. >From dean@genmagic.com (Dean Yu)
  616. Date: 29 Apr 1994 18:03:16 GMT
  617. Organization: General Magic, Inc.
  618.  
  619. In article <Bruce_Burkhalter-290494092455@supercheese.berksys.com>,
  620. Bruce_Burkhalter@inetlink.berksys.com (Bruce Burkhalter) wrote:
  621. > In article <2po62v$b0m@nef.ens.fr>, pottier@goelette.ens.fr (Francois
  622. > Pottier) wrote:
  623. > > KON Well, I came up with a super KON kluge. All of my objects are allocated
  624. > >     within a custom heap zone created with InitZone. This way I don't need to
  625. > >     free individual blocks, I just DisposeHandle the whole zone and I'm done.
  626. > This is on ok thing to do but you have to be really careful about what get
  627. > allocated in it.  If you are set to the heap and you do font stuff then
  628. > some font related structures and resources will get loaded into it.  When
  629. > ...
  630. > The reason to create a heap like this is not so you don't have to free
  631. > individual blocks.  That is just sloppy programming.  We use it for
  632. > allocating MultiFinder temp mem and turning it into a heap so we can use
  633. > standard memory manager and resource calls with temp mem.
  634.  
  635.   When the Modern Memory Manager was being developed for Power Macs, about
  636. 20% of the time was spent actually coding it, then the rest of the time was
  637. spent going back in and adding compatability hacks to keep things that
  638. messed around with heaps and blocks working. In the end, it was much less
  639. cool than it could have been because too many things broke at first. The
  640. biggest headaches were programs that created their own heaps or walked the
  641. heaps themselves. If you're going to do either of these things, think long
  642. and hard about why and how you're doing it, what kind of assumptions about
  643. the structures you're making, and if possible, if there is any other way
  644. for you to do what you want to do.
  645.  
  646. -- Dean Yu
  647.    Negative Ethnic Role Model
  648.    General Magic, Inc.
  649.  
  650. +++++++++++++++++++++++++++
  651.  
  652. >From pottier@trimaran.ens.fr (Francois Pottier)
  653. Date: 30 Apr 1994 11:49:07 GMT
  654. Organization: Ecole Normale Superieure, PARIS, France
  655.  
  656. In article <dean-290494105850@dean_yu.genmagic.com>,
  657. Dean Yu <dean@genmagic.com> wrote:
  658.  
  659. >> > KON Well, I came up with a super KON kluge. All of my objects are allocated
  660. >> >     within a custom heap zone created with InitZone. This way I don't need to
  661. >> >     free individual blocks, I just DisposeHandle the whole zone and I'm done.
  662.  
  663. >> The reason to create a heap like this is not so you don't have to free
  664. >> individual blocks.  That is just sloppy programming.  We use it for
  665. >> allocating MultiFinder temp mem and turning it into a heap so we can use
  666. >> standard memory manager and resource calls with temp mem.
  667. >
  668. >If you're going to do either of these things, think long
  669. >and hard about why and how you're doing it, what kind of assumptions about
  670. >the structures you're making, and if possible, if there is any other way
  671. >for you to do what you want to do.
  672.  
  673. I know, and I have thought long and hard about it. My problem is the
  674. same as Bruce's : trying to make temporary memory behave the same way
  675. as normal memory.
  676.  
  677. I tried to think of other ways. For instance, since GetResource won't
  678. let you read a resource into temp mem, I figured I could create a block
  679. with TempNewHandle and then read into it with ReadPartialResource. This
  680. should work.
  681.  
  682. But I have another problem: the resource I want to load is a Quicktime
  683. compressed picture. Then I need to draw that picture. But Quicktime
  684. needs a lot of temporary storage for decompression, and apparently takes
  685. it from the current heap. So if the current heap is the System heap, or
  686. my own application heap, Quicktime runs out of memory and blows everything
  687. out of the water. That's why I had to create a heap in temporary memory.
  688.  
  689. I also thought of patching NewHandle of NewPtr in order to force Quicktime
  690. to use temp mem, but then I thought it was even skankier than creating my
  691. own zone.
  692.  
  693. If you have any ideas about that problem, I'd be really really glad to
  694. hear about them.
  695.  
  696. Thanks...
  697.  
  698. -- 
  699. Francois Pottier
  700. pottier@dmi.ens.fr
  701.  
  702. +++++++++++++++++++++++++++
  703.  
  704. >From slavins@psy.man.ac.uk (Simon Slavin)
  705. Date: 30 Apr 94 13:19:15 GMT
  706. Organization: Psychology Department, University of Manchester, England, UK
  707.  
  708. In article b0m@nef.ens.fr, pottier@goelette.ens.fr (Francois Pottier) writes:
  709. >
  710. >[This puzzle is not as hard as usual KON&BAL ones... I apologize to the
  711. > real KON & BAL...]
  712.  
  713. Send it in !  develop will probably love it, and may publish it as a warning
  714. to treat memory allocation for the managers with care.  They'll especially
  715. like the way you used a de-bugger to figure out what was wrong.
  716. Actually, KON reads this group (very rarely) so he may see it.
  717. (KON co-wrote wonderprint, based on a column in an early develop.)
  718.  
  719. Glad you found you bug.
  720.  
  721. Simon.
  722. - -
  723. < "So I told her a couple of white lies, like I have friends and a life ..." >
  724. < - _Cheers_   A sub-Turing machine, and proud of it:  slavins@psy.man.ac.uk >
  725.  
  726.  
  727. +++++++++++++++++++++++++++
  728.  
  729. >From Reid Ellis <rae@alias.com>
  730. Date: Mon, 2 May 1994 23:22:57 GMT
  731. Organization: Alias Research, Inc., Toronto ON Canada
  732.  
  733. dean@genmagic.com (Dean Yu) writes:
  734. |  When the Modern Memory Manager was being developed for Power Macs, about
  735. |20% of the time was spent actually coding it, then the rest of the time was
  736. |spent going back in and adding compatability hacks to keep things that
  737. |messed around with heaps and blocks working.
  738.  
  739. Why weren't new memory manager calls created that didn't do the
  740. backwards-compatability hacks?  Then we could start using the new
  741. routines, and everyone's new apps are mondo cool.  We could even call
  742. it "Memory Manager GX"! :-)/2
  743.  
  744. Reid
  745.  
  746. --
  747. - -
  748. Reid Ellis, Alias Research Inc.
  749. +1 416 362 9181 <rae@Alias.com>
  750.  
  751. +++++++++++++++++++++++++++
  752.  
  753. >From 103t_english@west.cscwc.pima.edu
  754. Date: 3 May 94 15:13:05 MST
  755. Organization: (none)
  756.  
  757. In article <1994May2.232257.26544@alias.com>, Reid Ellis <rae@alias.com> writes:
  758. > dean@genmagic.com (Dean Yu) writes:
  759. > |  When the Modern Memory Manager was being developed for Power Macs, about
  760. > |20% of the time was spent actually coding it, then the rest of the time was
  761. > |spent going back in and adding compatability hacks to keep things that
  762. > |messed around with heaps and blocks working.
  763. > Why weren't new memory manager calls created that didn't do the
  764. > backwards-compatability hacks?  Then we could start using the new
  765. > routines, and everyone's new apps are mondo cool.  We could even call
  766. > it "Memory Manager GX"! :-)/2
  767. > Reid
  768. > --
  769. > ---
  770. > Reid Ellis, Alias Research Inc.
  771. > +1 416 362 9181 <rae@Alias.com>
  772.  
  773.  
  774. Great minds and all that...
  775.  
  776.  
  777. The could even have supplied New_and_Improved API's for it and started advanced
  778. notice on what will be required for protected memory and pre-emptive
  779. multi-tasking...
  780.  
  781.  
  782. Lawson
  783.  
  784. +++++++++++++++++++++++++++
  785.  
  786. >From dwareing@apanix.apana.org.au (David Wareing)
  787. Date: 2 May 94 15:53:15 GMT
  788. Organization: Apanix Public Access Unix, +61 8 373 5485 (5 lines)
  789.  
  790. pottier@goelette.ens.fr (Francois Pottier) writes:
  791.  
  792. >I had a hell of a debugging session last night... I had to single-step
  793. >through the Palette Manager in order to understand what was wrong with my
  794. >code. After solving the problem I thought the story was amusing, so I turned
  795. >it into a KON & BAL Puzzle Page. Here it is. I hope you like it...
  796.  
  797. >[This puzzle is not as hard as usual KON&BAL ones... I apologize to the
  798. > real KON & BAL...]
  799.  
  800. <Puzzle involving the disposal of GWorlds, deleted>
  801.  
  802.  
  803. This is the first time I've ever solved one of KON & BAL'S puzzles :-)
  804. Does anyone else feel like a complete moron and utterly humiliated, after
  805. reading one of their puzzles?
  806.  
  807. :)
  808.  
  809. BTW, Francois - some nice tracing you did there. I would have scrapped any
  810. 5 or 6 routines at random, rewrote them and see how it worked :)
  811.  
  812. --
  813. David Wareing
  814. Adelaide, South Australia
  815. Mac Games & Multimedia Development        dwareing@apanix.apana.org.au
  816. - --------------------------------------------------------------------
  817.  
  818. +++++++++++++++++++++++++++
  819.  
  820. >From sparent@mv.us.adobe.com (Sean Parent)
  821. Date: Wed, 4 May 1994 19:14:53 GMT
  822. Organization: Adobe Systems Incorporated
  823.  
  824. In article <1994May2.232257.26544@alias.com>, Reid Ellis <rae@alias.com>
  825. wrote:
  826.  
  827. > Why weren't new memory manager calls created that didn't do the
  828. > backwards-compatability hacks?  Then we could start using the new
  829. > routines, and everyone's new apps are mondo cool.  We could even call
  830. > it "Memory Manager GX"! :-)/2
  831.  
  832. Because the heaps have different structures so the system would have to
  833. have a third set of calls that knew what to do with each heap slowing down
  834. the new mondo cool applications even more (and much of the speed win is
  835. coming from calls made within the system heap)! Your app would have to be
  836. very very careful about not making new calls on the system or process
  837. manager heaps. There where a couple of compatibility hacks where a shadow
  838. API would have been useful but not enough to worry about.
  839.  
  840. -- 
  841. Sean Parent
  842.  
  843. +++++++++++++++++++++++++++
  844.  
  845. >From u9119523@sys.uea.ac.uk (Graham Cox)
  846. Date: Thu, 5 May 1994 17:20:20 GMT
  847. Organization: School of Information Systems, UEA, Norwich
  848.  
  849. In article <dwareing.767893995@apanix.apana.org.au>,
  850. dwareing@apanix.apana.org.au (David Wareing) wrote:
  851.  
  852. > This is the first time I've ever solved one of KON & BAL'S puzzles :-)
  853. > Does anyone else feel like a complete moron and utterly humiliated, after
  854. > reading one of their puzzles?
  855.  
  856. Nope- I feel glad that I have a life, whereas those two obviously don't in
  857. spite of the fact I'm stuck in rainy old England while they live in Cal...
  858.  
  859.  
  860. - ------------------------------------------------------------------------
  861. Love & BSWK, Graham
  862.  
  863. -Everyone is entitled to their opinion, no matter how wrong they may be...
  864. - ------------------------------------------------------------------------
  865.  
  866. ---------------------------
  867.  
  868. >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar)
  869. Subject: Absoft C++
  870. Date: 05 May 1994 12:45:53 GMT
  871. Organization: L'AISON - Beverly Hills, Michigan
  872.  
  873. Jess M Holle (jess@ecn.purdue.edu) asks:
  874.  
  875.  > When does the C/C++ Absoft PPC compiler ship?
  876.  > Does it run only under MPW?
  877.  > Does it have templates, exceptions, namespaces, RTTI, etc?
  878.  > What's optimization going to be like as compared to Apple SDK,
  879.  > CodeWarrior, and Symantec's Cross-compiler?
  880.  
  881.  - The compiler will ship in July.
  882.  
  883.  - Yes, so far we are targetting it as an MPW Tool.  We may study
  884.  other possibilities; no immediate plans to change though.
  885.  
  886.  As for the features list, bear in mind that I am speaking unofficially
  887.  a couple of months before the product is released--things might change
  888.  before then (or even before I'm done typing these notes!):
  889.  
  890.   - Exceptions:  Probably not.
  891.  
  892.   - Namespaces: No.
  893.  
  894.   - RTTI: No.
  895.  
  896.   - Optimizations include but are not limited to:  Sophisticated
  897.  register allocation, working inliner, common sub-expression removal,
  898.  dead store removal, code scheduling, loop invariant removal, loop
  899.  unrolling, etc.  In a nutshell, I can say we'll be able to do mostly
  900.  the same optimizations that we do with our FORTRAN compilers.
  901.  
  902.  As for comparing it to Apple, Symantec, and other products, it's a
  903.  bit premature for that.  Maybe as we get through beta testing and
  904.  closer to release, we'll have some basis for comparisons.
  905.  
  906.  If you have any other technical questions, feel free
  907.  to contact me; either in the newsgroup or directly at
  908.  "support@absoft.com".  Thanks for your interest.
  909.  
  910.  
  911.  Lee David Rimar
  912.  Absoft Technical Support
  913.  (support@absoft.com, not the address in the message header)
  914.  
  915.  
  916.  DISCLAIMER:  Any opinions you find in this text are probably mine,
  917.  but you're welcome to share them.
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925. +++++++++++++++++++++++++++
  926.  
  927. >From rmah@panix.com (Robert S. Mah)
  928. Date: Fri, 06 May 1994 03:19:40 -0500
  929. Organization: One Step Beyond
  930.  
  931. Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) wrote:
  932.  
  933. >  - The compiler [Absoft C/C++] will ship in July.
  934. > [...]
  935. >   - Exceptions:  Probably not.
  936. >   - Namespaces: No.
  937. >   - RTTI: No.
  938. >   - Optimizations include but are not limited to:  Sophisticated
  939. >     register allocation, working inliner, common sub-expression removal,
  940. > [...]
  941.  
  942. Thanks for the info...
  943.  
  944. How about templates?  Level of segmentation support?  Inline assembly 
  945. (68K and PPC)?  Will it generate both 68K and PPC code?  What provisions 
  946. are there for creating code resources (e.g. WDEF's and CDEF's)?
  947.  
  948. Cheers,
  949. Rob
  950. ___________________________________________________________________________
  951. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  952.  
  953. ---------------------------
  954.  
  955. >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar)
  956. Subject: Absoft on Power Mac
  957. Date: 02 May 1994 15:11:22 GMT
  958. Organization: L'AISON - Beverly Hills, Michigan
  959.  
  960.  Steve Ebstein (sebstein@netcom.com) asks:
  961.  
  962.  > Has Absoft's PowerPC native compiler shipped?
  963.  > Do you have any benchmark info comparing the 
  964.  > native compiler with the 68K versions ?
  965.  
  966.  Yes and Yes.  We starting shipping last week, and in general we
  967.  run between 4 to 8 times faster than a 68040.  It's hard to get
  968.  more detailed than that, because it depends a lot on specific
  969.  machine configurations and the kind of programs you're running.
  970.  
  971.  But that "4 to 8 times faster" comment is based on comparing
  972.  Whetstone and Linpack benchmarks on a couple of systems we
  973.  have here; a Power Mac 7100/66 and a Centris 650.  Whetstone
  974.  was about 4x faster on the Power Mac; Linpack about 8x.
  975.  
  976.  Remember: Your actual mileage may vary.
  977.  
  978.  
  979.  Lee D. Rimar
  980.  support@absoft.com
  981.  
  982.  Disclaimer:  Anything resembling an opinion probably is just that.
  983.  
  984.  
  985. +++++++++++++++++++++++++++
  986.  
  987. >From rmah@panix.com (Robert S. Mah)
  988. Date: Tue, 03 May 1994 02:15:57 -0500
  989. Organization: One Step Beyond
  990.  
  991. Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar) wrote:
  992.  
  993. >  Yes and Yes.  We starting shipping last week, and in general we
  994. >  run between 4 to 8 times faster than a 68040.  It's hard to get
  995. >  more detailed than that, because it depends a lot on specific
  996. >  machine configurations and the kind of programs you're running.
  997.  
  998. So, could you give us a bit more info about the Absoft compiler?  The
  999. level of ANSI conformance, environment support (I assume it needs MPW?),
  1000. retail price, etc.
  1001.  
  1002. Cheers,
  1003. Rob
  1004. ___________________________________________________________________________
  1005. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  1006.  
  1007. +++++++++++++++++++++++++++
  1008.  
  1009. >From Lee_D._Rimar@laison.w8hd.org (Lee D. Rimar)
  1010. Subject: Absoft on Power Mac
  1011. Date: 05 May 1994 12:45:36 GMT
  1012. Organization: L'AISON - Beverly Hills, Michigan
  1013.  
  1014. Robert S. Mah (rmah@panix.com) asks:
  1015.  
  1016.  > Could you give us a bit more info about the Absoft compiler?  The
  1017.  > level of ANSI conformance, environment support (I assume it needs
  1018.  > MPW?), retail price, etc.
  1019.  
  1020.  I'd be glad to give you more info.  A little disclaimer up front though:
  1021.  I know many people are (justifiably) sensitive to any post that is even
  1022.  remotely "commercial" sounding, and my responses to your questions will
  1023.  probably qualify (especially since you asked the price).  But you *did*
  1024.  ask, so here I go...
  1025.  
  1026.  - The compiler is a full ANSI X3.9-1978 implementation, plus it offers
  1027.  lots of extensions (a good subset of VAX extensions, mostly).
  1028.  
  1029.  - Environment support:  Yes, this is an MPW tool.  We provide our own
  1030.  linker and debugger, but for editting, compiler control, etc., you use
  1031.  MPW.  Actually, I've played around with BBEdit and ToolServer, it works
  1032.  okay; and I'm told there are other text editors with AppleEvent and
  1033.  ToolServer support--so I suppose if you really *hated* MPW you could
  1034.  avoid using it.  But personally, I like MPW.
  1035.  
  1036.  - Retail price is $699, but there are good introductory offers going on
  1037.  now.  You should contact our sales department at 313-853-0050 for more
  1038.  details.
  1039.  
  1040.  If you have other questions, feel free to ask (either in the newsgroup,
  1041.  or write to me direct at "support@absoft.com").  Thanks for your interest.
  1042.  
  1043.  
  1044.  Lee D. Rimar
  1045.  Absoft Technical Support
  1046.  (support@absoft.com, not the address in the message header)
  1047.  
  1048.  
  1049.  DISCLAIMER:  Any opinions in this text are probably mine, but I don't
  1050.  know if anyone agrees with me.
  1051.  
  1052.  
  1053.  
  1054. ---------------------------
  1055.  
  1056. >From parkb@bigbang.Stanford.EDU (Brian Park)
  1057. Subject: Another BlockMove question
  1058. Date: 2 May 1994 17:48:35 GMT
  1059. Organization: Stanford University
  1060.  
  1061. Robert S. Mah <rmah@panix.com> wrote:
  1062. >It's not supposed to move memory.  The only problems that could occur
  1063. >is if someone patches BlockMove and the patch moves memory.
  1064.  
  1065. Thanks, something I've wondered myself.  Here's related question:
  1066.  
  1067. Which is more efficient, BlockMove() or standard ANSI memmove() 
  1068. (coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1069. difference great enough that I should care at all?  I realize that
  1070. memmove() will usually be in another segment, so you have lock the
  1071. handle because the Segment Manager will move memory (took me a little
  1072. while to catch that bug...).  BlockMove() flushes the cache, so how much
  1073. penalty is that?  Does BlockMove() move one byte at a time, or does it
  1074. try to optimize by moving words or long words?
  1075.  
  1076. Brian Park
  1077.  
  1078. +++++++++++++++++++++++++++
  1079.  
  1080. >From jiangwu@sickdog.CS.Berkeley.EDU (Jiang Wu ~{Nb=-~})
  1081. Date: 2 May 1994 20:50:27 GMT
  1082. Organization: University of California, Berkeley
  1083.  
  1084. In article <2q3edj$p56@nntp2.stanford.edu>,
  1085. Brian Park <parkb@bigbang.Stanford.EDU> wrote:
  1086. >
  1087. >Which is more efficient, BlockMove() or standard ANSI memmove() 
  1088. >(coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1089.  
  1090. I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C
  1091. 5.0.  The result shows that BlockMove() is MUCH faster than memcpy().
  1092. I don't have the numbers with me right now.  I think BlockMove() is 
  1093. almost twice as fast as memcpy().
  1094.  
  1095. I also used BlockMove() to copy a piece of RAM to the VRAM on my PB160.
  1096. Copying to VRAM takes ~40% (or was it 60%) longer than copying to RAM.
  1097.  
  1098. -- Jiang
  1099.  
  1100.  
  1101.  
  1102.  
  1103. +++++++++++++++++++++++++++
  1104.  
  1105. >From jwbaxter@olympus.net (John W. Baxter)
  1106. Date: Mon, 02 May 1994 15:09:33 -0700
  1107. Organization: Internet for the Olympic Peninsula
  1108.  
  1109. In article <2q3edj$p56@nntp2.Stanford.EDU>, parkb@bigbang.Stanford.EDU
  1110. (Brian Park) wrote:
  1111.  
  1112. > Robert S. Mah <rmah@panix.com> wrote:
  1113. > >It's not supposed to move memory.  The only problems that could occur
  1114. > >is if someone patches BlockMove and the patch moves memory.
  1115. > Thanks, something I've wondered myself.  Here's related question:
  1116. > Which is more efficient, BlockMove() or standard ANSI memmove() 
  1117. > (coded in 680x0 assembly, both running on a 680x0 machine)?
  1118.  
  1119. Only testing will tell you for sure, and then only for the Mac models you
  1120. test on.  I'd expect that BlockMove () would be better.  [BlockMoveData (),
  1121. in fact, if there's no chance that what you are moving might be code, since
  1122. BlockMoveData () doesn't flush the '40 instruction cache, only the data
  1123. cache.]  BlockMove does pretty well about moving memory in chunks, rather
  1124. than byte at a time.  Either way will perform better if the data are
  1125. aligned well, particularly BlockMove ().  If the data are in handles, they
  1126. are aligned well.
  1127.  
  1128. In addition to moving in multi-byte chunks where possible, BlockMove () has
  1129. the advantage of being coded for the particular machine it's running on
  1130. (including PowerPC), whereas memmove () in a library is probably optimized
  1131. for only a particular member of the 680x0 family (and likely an old one
  1132. like an '020 at that).
  1133.  
  1134. -- 
  1135. John Baxter    Port Ludlow, WA, USA  [West shore, Puget Sound]
  1136.    jwbaxter@pt.olympus.net
  1137.  
  1138. +++++++++++++++++++++++++++
  1139.  
  1140. >From MorrisGC@ccmail.apldbio.com (George Morris)
  1141. Date: 2 May 94 23:30:02 GMT
  1142. Organization: Perkin Elmer, Applied Biosystems Div.
  1143.  
  1144. In article <2q3p2j$pt7@agate.berkeley.edu>, jiangwu@sickdog.CS.Berkeley.EDU
  1145. (Jiang Wu ~{Nb=-~}) wrote:
  1146.  
  1147. > In article <2q3edj$p56@nntp2.stanford.edu>,
  1148. > Brian Park <parkb@bigbang.Stanford.EDU> wrote:
  1149. > >
  1150. > >Which is more efficient, BlockMove() or standard ANSI memmove() 
  1151. > >(coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1152. > I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C
  1153. > 5.0.  The result shows that BlockMove() is MUCH faster than memcpy().
  1154. > I don't have the numbers with me right now.  I think BlockMove() is 
  1155. > almost twice as fast as memcpy().
  1156. > I also used BlockMove() to copy a piece of RAM to the VRAM on my PB160.
  1157. > Copying to VRAM takes ~40% (or was it 60%) longer than copying to RAM.
  1158. > -- Jiang
  1159.  
  1160.  
  1161. Be careful!  When you say MUCH faster, what was your block size during the
  1162. tests?  BlockMove is more efficient but incurs the overhead of a trap call.
  1163.   A colleague at a previous company did some investiagtion into this and
  1164. found that for moves less than about 600 bytes (on a MacIIfx, MPW compiler
  1165. & linker) memcpy was faster because there was no trap call overhead.  I'm
  1166. not sure where the point will fall on todays systems but a IIfx is probably
  1167. above the median in performance of installed Macs and a good general
  1168. benchmark.  
  1169.  
  1170. George Morris
  1171. Applied Biosystems
  1172.  
  1173.  
  1174. +++++++++++++++++++++++++++
  1175.  
  1176. >From rmah@panix.com (Robert S. Mah)
  1177. Date: Mon, 02 May 1994 19:18:45 -0500
  1178. Organization: One Step Beyond
  1179.  
  1180. parkb@bigbang.Stanford.EDU (Brian Park) wrote:
  1181.  
  1182. > Robert S. Mah <rmah@panix.com> wrote:
  1183. > >It's not supposed to move memory.  The only problems that could occur
  1184. > >is if someone patches BlockMove and the patch moves memory.
  1185. > Thanks, something I've wondered myself.  Here's related question:
  1186. > Which is more efficient, BlockMove() or standard ANSI memmove() 
  1187. > (coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1188. > difference great enough that I should care at all?  I realize that
  1189. > [...]
  1190.  
  1191. Because of various factors such as trap dispatcher and cache flushing
  1192. BlockMove is usually only faster when used with large blocks.  memmove()
  1193. and memcpy() are often faster if you're dealing with small blocks.
  1194.  
  1195. How large is "large" and how small is "small"?  It depends on the machine,
  1196. block alignment, whether it's executable code or not, etc.  I personally
  1197. use the rule of thumb that if I'm moving 256 bytes or less I use use my
  1198. own memory moving routine (similar to memmove) and if it's over 1024 bytes,
  1199. I use BlockMove.  Things in between depend on my mood.
  1200.  
  1201. Cheers,
  1202. Rob
  1203. ___________________________________________________________________________
  1204. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  1205.  
  1206. +++++++++++++++++++++++++++
  1207.  
  1208. >From sgl1@kimbark.uchicago.edu (Steven Lane)
  1209. Date: Mon, 2 May 1994 23:49:40 GMT
  1210. Organization: University of Chicago
  1211.  
  1212. jiangwu@sickdog.CS.Berkeley.EDU (Jiang Wu ~{Nb=-~}) writes:
  1213. >In article <2q3edj$p56@nntp2.stanford.edu>,
  1214. >Brian Park <parkb@bigbang.Stanford.EDU> wrote:
  1215. >>
  1216. >>Which is more efficient, BlockMove() or standard ANSI memmove() 
  1217. >>(coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1218. >
  1219. >I did some tests on memcpy() vs. BlockMove() on my PB160 using THINK C
  1220. >5.0.  The result shows that BlockMove() is MUCH faster than memcpy().
  1221. >I don't have the numbers with me right now.  I think BlockMove() is 
  1222. >almost twice as fast as memcpy().
  1223.  
  1224. I can confirm this for my own attempts to write a byte-copying routine
  1225. that would do short string copies faster than BlockMove. The
  1226. break-even point was around 20 characters. My assembly loop's
  1227. execution time rose *much* more rapidly than BlockMove's, which (in my
  1228. pretty extensive tests) had a very low time/block-size slope.
  1229. BlockMove, in other words, is pretty darn efficient.
  1230.  
  1231.  
  1232. -- 
  1233. - --
  1234. Steve Lane
  1235. University of Chicago, Department of History
  1236. sgl1@midway.uchicago.edu
  1237.  
  1238. +++++++++++++++++++++++++++
  1239.  
  1240. >From rang@winternet.mpls.mn.us (Anton Rang)
  1241. Date: 02 May 1994 23:04:17 GMT
  1242. Organization: Minnesota Angsters
  1243.  
  1244. In article <2q3edj$p56@nntp2.Stanford.EDU> parkb@bigbang.Stanford.EDU (Brian Park) writes:
  1245. >Which is more efficient, BlockMove() or standard ANSI memmove() 
  1246. >(coded in 680x0 assembly, both running on a 680x0 machine)?
  1247.  
  1248.   Depends on how much data you're transferring.  Against a fairly
  1249. simple memory-move replacement I wrote, BlockMove was faster on chunks
  1250. of data bigger than 200-300 bytes or so; my routine was faster on
  1251. smaller chunks.
  1252.  
  1253. >Is the difference great enough that I should care at all?
  1254.  
  1255.   Is this happening in an inner loop somewhere?  Does your profiler
  1256. say that BlockMove() or memmove() is a bottleneck?  If not, why worry
  1257. about it?
  1258.  
  1259. >BlockMove() flushes the cache, so how much penalty is that?
  1260.  
  1261.   Can be quite a bit in a big loop, or on an '040.  Use the new
  1262. BlockMoveData() routine (aka "BlockMove with an extra bit set") if you
  1263. don't want the cache to be flushed on newer systems.  (Built in on the
  1264. Power Macintoshes, supposed to be included in a new system release for
  1265. older machines.)
  1266.  
  1267. >Does BlockMove() move one byte at a time, or does it
  1268. >try to optimize by moving words or long words?
  1269.  
  1270.   It may use move.b, move.w, move.l, or move16, depending on what
  1271. processor you're on and what the alignment is.  (I'm not sure whether
  1272. the current '040 BlockMove tries to use move16 or not...but it could.)
  1273. It's got some fairly large unrolled loops and various tricks to make
  1274. the last few bytes get transferred quickly.  Beating it for large
  1275. transfers could probably be done, but most likely isn't worth it.  For
  1276. small transfers, the trap dispatcher overhead (plus cache flush) can
  1277. be pretty expensive.
  1278.  
  1279.   It also makes a difference if the area of memory you're moving is
  1280. VM-locked or not, but unless you're doing drivers, you probably don't
  1281. need to worry about it.
  1282. --
  1283. Anton Rang (rang@winternet.mpls.mn.us)
  1284.  
  1285. +++++++++++++++++++++++++++
  1286.  
  1287. >From Bruce@hoult.actrix.gen.nz (Bruce Hoult)
  1288. Date: Tue, 3 May 1994 17:17:30 +1200 (NZST)
  1289. Organization: (none)
  1290.  
  1291. parkb@bigbang.Stanford.EDU (Brian Park) writes:
  1292. > Which is more efficient, BlockMove() or standard ANSI memmove() 
  1293. > (coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1294. > difference great enough that I should care at all?
  1295.  
  1296. For really small blocks (like 10 bytes or smaller), memcpy or memmove
  1297. (always use memcpy if you're sure the memory areas don't overlap --
  1298. it's faster) are much faster than BlockMove.
  1299.  
  1300. For really big blocks (like a few KB or bigger), BlockMove is much
  1301. faster.
  1302.  
  1303. For blocks in between: test on your own machine, the tradeoff point
  1304. moves.
  1305.  
  1306.  
  1307. > Does BlockMove() move one byte at a time, or does it
  1308. > try to optimize by moving words or long words?
  1309.  
  1310. On most machines, it trys to use long words.  On 68040 machines it
  1311. trys to use the MOVE16 instruction, which speeds things up by 50%
  1312. over a byte, word, or longword move -- on 040's a memory move is
  1313. essentially memory bandwidth limited (on my Q700, anyway) and byte,
  1314. word and longword copying loops are all the same speed, but MOVE16
  1315. is faster.
  1316.  
  1317. This is because of the cache.
  1318.  
  1319. Suppose you execute MOVE.L (AO),(A1) where the memory pointed to by
  1320. both A0 and A1 is different and not in cache.  It goes like this
  1321. (only on an '040):
  1322.  
  1323. 1) read the 16 bytes around (A0)
  1324. 2) read the 16 bytes around (A1)
  1325. 3) modify the appropriate longword in the cache line
  1326. 4) (eventually) write the 16 bytes around (A1)
  1327.  
  1328. As you can see, that requires three memory transactions for each 16
  1329. bytes copied.
  1330.  
  1331. When you use MOVE16, the CPU knows that you're going to modify all
  1332. 16 bytes in a cache line, and so it doesn't need to read them from
  1333. memory before changing them, resulting in a 50% speedup.
  1334.  
  1335. -- Bruce
  1336.  
  1337. +++++++++++++++++++++++++++
  1338.  
  1339. >From bdiamand@netcom.com (Ben Diamand)
  1340. Date: Tue, 3 May 1994 17:50:27 GMT
  1341. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1342.  
  1343. Just to add my 2 cents, I once wrote an asm BlockMove like routine
  1344. that knew about my machine(Se/30) and messed with the CACR.  I was
  1345. unable to *beat* BlockMove consistantly.  I was faster on non-aligned
  1346. data, and it was faster on %4/%16 data, but only by a real
  1347. small amount either way.  What does this mean?  I don't have a clue,
  1348. but I use NGetTrapAddress, and always use BlockMove, having proved to
  1349. myself that It was useless to roll my own, considering that I 
  1350. would have to most likely re-write it for each new chip.  For the
  1351. same reason, I would suspect that a library routine would not
  1352. be optimized for all chips. 
  1353.  
  1354. Ben Diamand
  1355. bdiamand@netcom.com
  1356. ALINK:bdiamand
  1357.  
  1358. +++++++++++++++++++++++++++
  1359.  
  1360. >From Ron_Hunsinger@bmug.org (Ron Hunsinger)
  1361. Date: Fri,  6 May 94 07:41:37 PST
  1362. Organization: Berkeley Macintosh Users Group
  1363.  
  1364. > Robert S. Mah <rmah@panix.com> wrote:
  1365. > >It's not supposed to move memory.  The only problems that could occur
  1366. > >is if someone patches BlockMove and the patch moves memory.
  1367.  
  1368. This kind of error would be immediately apparent, since the memory manager
  1369. moves memory by calling BlockMove.
  1370.  
  1371. > Thanks, something I've wondered myself.  Here's related question:
  1372. > Which is more efficient, BlockMove() or standard ANSI memmove() 
  1373. > (coded in 680x0 assembly, both running on a 680x0 machine)?  Is the
  1374. > difference great enough that I should care at all?  I realize that
  1375. > [...]
  1376.  
  1377. If you've ever disassembled BlockMove(), you'll see that it's optimized
  1378. to within an inch of its life.  Even with the trap dispatch overhead, it's
  1379. pretty hard to beat.  On anything bigger than 10 or 20 bytes, the only
  1380. thing that is likely to beat BlockMove would be BlockMove minus the trap 
  1381. dispatch code.  (Call NGetTrapAddress, and then write your own routine
  1382. that jumps directly to that address without trapping.  That's what the
  1383. Memory Manager does, but Apple doesn't recommend it for us mere mortals.
  1384. Of course, the ROM knows how to do NGetTrapAddress on the fly without 
  1385. calling NGetTrapAddress.)
  1386.  
  1387. memmove() is more interested in portability than speed.  I doubt that
  1388. it can beat BlockMove(), even on very short blocks and even despite the
  1389. trap dispatch overhead.
  1390.  
  1391. -Ron Hunsinger
  1392.  
  1393. ---------------------------
  1394.  
  1395. >From mars@netcom.com (Darren Giles)
  1396. Subject: Async Disk Access
  1397. Date: Wed, 4 May 1994 04:26:15 GMT
  1398. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  1399.  
  1400. This may be hopeless, but is there any way to do an async read from a
  1401. volume while QuickDraw activity is going on?  I'm trying to read
  1402. from a CD-ROM volume while doing CopyBits and such.
  1403.  
  1404. I'd like to make it "real" async operation, so I can continue getting
  1405. events, etc...  but I'm willing to try anything.  I don't even need
  1406. a notification on completion; I can just poll the last byte of the
  1407. buffer.
  1408.  
  1409. Is there any way to do this?  With the new SCSI Manager & all, I'm
  1410. keeping my fingers crossed.
  1411.  
  1412. - Darren "no nickname" Giles
  1413. - wishing the async versions of the routines really worked!
  1414.  
  1415.  
  1416. +++++++++++++++++++++++++++
  1417.  
  1418. >From rang@winternet.mpls.mn.us (Anton Rang)
  1419. Date: 04 May 1994 13:07:14 GMT
  1420. Organization: Minnesota Angsters
  1421.  
  1422. In article <marsCp9GBr.B95@netcom.com> mars@netcom.com (Darren Giles) writes:
  1423. >This may be hopeless, but is there any way to do an async read from a
  1424. >volume while QuickDraw activity is going on?  I'm trying to read
  1425. >from a CD-ROM volume while doing CopyBits and such.
  1426.  
  1427.   Sure.  Just call _Read with the asynchronous bit of the trap set.
  1428. You'll get a call through IOCompletion when it finishes, or you can
  1429. test the IOResult field of the parameter block.  (Don't poll the
  1430. buffer, you never know for sure what might come into it, and there's
  1431. no guarantee that it's being filled in the order you expected.)
  1432.  
  1433. >Is there any way to do this?  With the new SCSI Manager & all, I'm
  1434. >keeping my fingers crossed.
  1435.  
  1436.   As you noted, the new SCSI manager will let this happen, assuming
  1437. that the driver you're using supports it.  (Offhand, I don't know
  1438. whether Apple's current CD drivers do or not.)  If you're on a machine
  1439. with the old SCSI manager, you're out of luck (unless you're using a
  1440. third-party SCSI card or something similar).
  1441. --
  1442. Anton Rang (rang@winternet.mpls.mn.us)
  1443.  
  1444. +++++++++++++++++++++++++++
  1445.  
  1446. >From kluev@jonathan.srcc.msu.su (Kluev)
  1447. Date: Fri, 6 May 94 14:54:31 +0400
  1448. Organization: (none)
  1449.  
  1450. In article <marsCp9GBr.B95@netcom.com> mars@netcom.com
  1451. (Darren Giles) wrote:
  1452. > This may be hopeless, but is there any way to do an async read from a
  1453. > volume while QuickDraw activity is going on?  I'm trying to read
  1454. > from a CD-ROM volume while doing CopyBits and such.
  1455. >  
  1456. > I'd like to make it "real" async operation, so I can continue getting
  1457. > events, etc...  but I'm willing to try anything.  I don't even need
  1458. > a notification on completion; I can just poll the last byte of the
  1459. > buffer.
  1460. > Is there any way to do this?  With the new SCSI Manager & all, I'm
  1461. > keeping my fingers crossed.
  1462.  
  1463. You can do a sort of this even with old SCSI Manager
  1464. (in genaral with any device driver). The key idea is to read small
  1465. chunks of data in paralel to other activity, thus it would be
  1466. pseudo-concurency.
  1467.  
  1468. Read       Read       Read...
  1469.      Draw       Draw...
  1470.  
  1471. 1. One way is to install VblTask (or whatever), read small chunk of
  1472. data from inside it, poll ioResult whithin next VblTask, if there is
  1473. noErr read next chunk, and so on. By varying chunk size and VblCount
  1474. parameters you will be able to set the speed of file operations.
  1475.  
  1476. 2. The alternate way is to use "call chaining", i.e. read a small
  1477. chunk of data with completion set, issue another read call from
  1478. inside completion and so on. This method lacks of adjusting of
  1479. speed (see above). Moreover sometimes it would crash your computer,
  1480. because "the first read terminated immediatly -> first
  1481. completion called -> second call issued -> it terminated immediatly
  1482. -> second compl called (on top of the first one: StackSpace
  1483. decreased), and ever and ever..". So your stack will grow into your
  1484. heap = crash. See Develop 15.
  1485.  
  1486. 3. You may combine the first and the second method: read ->
  1487. completion-> VInstall (or whatever, will break completion chain) ->
  1488. VblTask -> read... But this is a bit more complicated, I recommend to
  1489. use the latter approach if the speed is really critical.
  1490.  
  1491. See details about async. routines in Develop 13, 15.
  1492.  
  1493. Michael Kluev.
  1494.  
  1495. ---------------------------
  1496.  
  1497. >From ggrant@Emerald.tufts.edu (G. Grant)
  1498. Subject: ExtFS Development
  1499. Date: Fri, 29 Apr 1994 17:46:04 GMT
  1500. Organization: Tufts University - Medford, MA
  1501.  
  1502. The "Apple External File System docs" write:
  1503.  
  1504. >"Our reccomendation at this point is against writing an external file
  1505. > system if there is any way to avoid it..."
  1506.  
  1507. The gods have spoken! Funny; I didn't think the ExtFS stuff would be 
  1508. taboo, especially since it has such a nice icon! :)
  1509.  
  1510. Ah, well, on to the next project, I guess...
  1511.  
  1512. -George
  1513.  
  1514.  
  1515. +++++++++++++++++++++++++++
  1516.  
  1517. >From tzs@u.washington.edu (Tim Smith)
  1518. Date: 1 May 1994 06:09:50 GMT
  1519. Organization: University of Washington School of Law, Class of '95
  1520.  
  1521. Amanda Walker <amanda@intercon.com> wrote:
  1522. >> Can someone point me to documentation on how to develop an External 
  1523. >> File System extension? I just couldn't seem to find the right tome... 
  1524. >
  1525. >It doesn't exist.  And unless someone is paying you a *lot* of money,
  1526. >you don't want to write an external file system.
  1527.  
  1528. It most certainly does exist.  It's called "FST Cookbook".  It even comes
  1529. with a diskette containing sample code.  My copy is beta 1988.  I don't
  1530. recall them ever coming out with a final version, so it may be hard
  1531. to track down, unless the first poster knows a developer who happened
  1532. to get a copy back then.
  1533.  
  1534. (Nope, mine is not for sale).
  1535.  
  1536. --Tim Smith
  1537.  
  1538. +++++++++++++++++++++++++++
  1539.  
  1540. >From Gavin@UMich.EDU (Gavin Eadie)
  1541. Date: Mon, 02 May 1994 10:42:55 -0400
  1542. Organization: Ramsay Consulting
  1543.  
  1544. In article <2pvh3e$hq4@news.u.washington.edu>, tzs@u.washington.edu (Tim
  1545. Smith) wrote:
  1546.  
  1547. > Amanda Walker <amanda@intercon.com> wrote:
  1548. > >> Can someone point me to documentation on how to develop an External 
  1549. > >> File System extension? I just couldn't seem to find the right tome... 
  1550. > >
  1551. > >It doesn't exist.  And unless someone is paying you a *lot* of money,
  1552. > >you don't want to write an external file system.
  1553. > It most certainly does exist.  It's called "FST Cookbook".  It even comes
  1554. > with a diskette containing sample code.  My copy is beta 1988.
  1555.  
  1556.    Nonetheless, what Amanda says is correct -- "you don't want to write an
  1557. external file system", I know, I've been there too and it's not fun.  There
  1558. was a presentation on a File System Manager at the WWDC two (three?) years
  1559. ago which looked like a rational alternative but I've not seem it show up
  1560. over the horizon yet ... Gav
  1561.  
  1562. +++++++++++++++++++++++++++
  1563.  
  1564. >From jumplong@aol.com (Jump Long)
  1565. Date: 3 May 1994 15:22:02 -0400
  1566. Organization: America Online, Inc. (1-800-827-6364)
  1567.  
  1568. In article <9404281622.AA30631@fusion.intercon.com>, amanda@intercon.com
  1569. (Amanda Walker) writes:
  1570.  
  1571. >ggrant@Emerald.tufts.edu (G. Grant) writes:
  1572. >> Can someone point me to documentation on how to develop an External 
  1573. >> File System extension? I just couldn't seem to find the right tome... 
  1574. >
  1575. >It doesn't exist.  And unless someone is paying you a *lot* of money,
  1576. >you don't want to write an external file system.
  1577.  
  1578. I'll agree that writing a foreign file system isn't an easy task - you can
  1579. expect to spend a minimum of several months on a simple read-only file system.
  1580.  
  1581. However...
  1582.  
  1583. Since I've spent many hours over the last year working on it, the "It doesn't
  1584. exist" statement is wrong.  At last year's WWDC (1993), Apple (re)announced
  1585. work on the File System Manager (known as FSM).  Since it was announced
  1586. publicly at the WWDC, FSM isn't secret information.  To prove how real it is,
  1587. Apple currently ships two foreign file systems based on FSM: the ProDOS File
  1588. System (part of the software that comes with the Apple IIe Card for the
  1589. Macintosh LC) and Macintosh PC Exchange.
  1590.  
  1591. At this time, only Developers in Apple's Partner's program have been seeded
  1592. with beta versions of FSM and draft documentation (if you aren't in the
  1593. Partner's program, don't ask for FSM because you WON'T get it until it ships to
  1594. all developers).  I'm working on a sample foreign file system but it may not be
  1595. available in complete working condition for some time (hey, I said it can take
  1596. months and I'm only able to work on it part time).
  1597.  
  1598. -- Jim Luther (one of those Apple DTS types)
  1599.  
  1600. P.S. Amanda Walker: InterCon Systems has been sent the FSM seed package (I
  1601. don't remember who I sent it to though).
  1602.  
  1603.  
  1604. +++++++++++++++++++++++++++
  1605.  
  1606. >From quinn@cs.uwa.edu.au (Quinn "The Eskimo!")
  1607. Date: Thu, 05 May 1994 10:06:15 +0800
  1608. Organization: Department of Computer Science, The University of Western Australia
  1609.  
  1610. In article <2q688q$6s1@search01.news.aol.com>, jumplong@aol.com (Jump
  1611. Long) wrote:
  1612.  
  1613. >At this time, only Developers in Apple's Partner's program have been seeded
  1614. >with beta versions of FSM and draft documentation [...]
  1615.  
  1616. Which begs the question... Why?  Lots of other beta managers make it out
  1617. to 'normal' developers.
  1618. -- 
  1619. Quinn "The Eskimo!"      <quinn@cs.uwa.edu.au>     "Support HAVOC!"
  1620. Department of Computer Science, The University of Western Australia
  1621.  
  1622. +++++++++++++++++++++++++++
  1623.  
  1624. >From amanda@intercon.com (Amanda Walker)
  1625. Date: Thu,  5 May 1994 16:21:40 -0500
  1626. Organization: InterCon Systems Corporation, Herndon, VA USA
  1627.  
  1628. jumplong@aol.com (Jump Long) writes:
  1629. > Since I've spent many hours over the last year working on it, the "It does
  1630. > n't exist" statement is wrong.  At last year's WWDC (1993), Apple (re)
  1631. > announced work on the File System Manager (known as FSM).
  1632.  
  1633. Yup.  Of course, it's been on-again/off-again since BEFORE SYSTEM 7 WENT 
  1634. ALPHA, so please excuse my skepticism about whether or not Apple "really means 
  1635. it" this time :).
  1636.  
  1637. > At this time, only Developers in Apple's Partner's program have 
  1638. > been seeded with beta versions of FSM and draft documentation (if 
  1639. > you aren't in the Partner's program, don't ask for FSM because you 
  1640. > WON'T get it until it ships to all developers).
  1641.  
  1642. We're a partner, we've got the draft docs, and we're sticking with ExtFSHook
  1643. since the FSM is not sufficient for our needs, and offers no benefits over 
  1644. doing it the "hard way".  Now, to be sure, the FSM will be useful for many 
  1645. developers, especially those trying to talk to physical devices instead of 
  1646. network servers (note that AppleShare doesn't use the FSM either, and won't be 
  1647. able to unless the FSM is revved severely).  It's not a general File System 
  1648. Manager, but I'll grant that if and when it's released it'll be useful to many 
  1649. developers.
  1650.  
  1651.  
  1652. Amanda Walker
  1653. InterCon Systems Corporation
  1654.  
  1655.  
  1656.  
  1657. +++++++++++++++++++++++++++
  1658.  
  1659. >From jumplong@aol.com (Jump Long)
  1660. Date: 6 May 1994 01:51:03 -0400
  1661. Organization: America Online, Inc. (1-800-827-6364)
  1662.  
  1663. In article <quinn-050594100615@eriodon.cs.uwa.oz.au>, quinn@cs.uwa.edu.au
  1664. (Quinn "The Eskimo!") writes:
  1665.  
  1666. >>At this time, only Developers in Apple's Partner's program have been seeded
  1667. >>with beta versions of FSM and draft documentation [...]
  1668. >
  1669. >Which begs the question... Why?  Lots of other beta managers make it out
  1670. >to 'normal' developers.
  1671.  
  1672. Why? Until a little over a month ago, all we had to send to developers with FSM
  1673. was an out-of-date ERS that didn't cover all of FSM and what it did cover had
  1674. lots of mistakes. With just the ERS, we expected (and received from seeded
  1675. developers) *lots* of questions that good documentation and sample code would
  1676. prevent.  Since Developer Support only takes questions from developers in the
  1677. Partners program, we didn't want to give a product with no documentation to
  1678. everyone.
  1679.  
  1680. OK, so the draft documentation is written so why are we waiting?  Because I'm
  1681. on sabbatical and don't feel like working of Apple business until I have to :-)
  1682.  
  1683. - Jim Luther
  1684.  
  1685.  
  1686. +++++++++++++++++++++++++++
  1687.  
  1688. >From jumplong@aol.com (Jump Long)
  1689. Date: 6 May 1994 02:07:02 -0400
  1690. Organization: America Online, Inc. (1-800-827-6364)
  1691.  
  1692. In article <9405051621.AA40138@fusion.intercon.com>, amanda@intercon.com
  1693. (Amanda Walker) writes:
  1694.  
  1695. >We're a partner, we've got the draft docs, and we're sticking with ExtFSHook
  1696. >since the FSM is not sufficient for our needs, and offers no benefits over 
  1697. >doing it the "hard way".
  1698.  
  1699. I'll agree that if you already have a working foreign file system that hangs
  1700. off the ToExtFS hook, you have little reason to rewrite your file system using
  1701. FSM.  Apple doesn't have plans to rewrite our non-FSM based forign file system
  1702. like AppleShare, High Sierra, ISO 9660, etc using FSM because they work OK with
  1703. the current File Manager (we, like you, don't have time to fix what isn't
  1704. broke).
  1705.  
  1706. >Now, to be sure, the FSM will be useful for many 
  1707. >developers, especially those trying to talk to physical devices instead of 
  1708. >network servers (note that AppleShare doesn't use the FSM either, and won't be
  1709.  
  1710. >able to unless the FSM is revved severely).  It's not a general File System 
  1711. >Manager, but I'll grant that if and when it's released it'll be useful to many
  1712.  
  1713. >developers.
  1714.  
  1715. AppleShare could be written using FSM.  FSM is *not* limited to file systems
  1716. that use only local physical devices. Amanda, I don't know why you think it has
  1717. to be revised.  We've done a lot of extra work to make sure FSM and the rest of
  1718. the file system related managers support calls like VolumeMount just to make it
  1719. easier.  If you want a more complete explanation of this, send me a Link at
  1720. DEVSUPPORT next week (when I'm back from sabbatical) and I'll be glad to
  1721. discuss this with you.
  1722.  
  1723. - Jim Luther
  1724.  
  1725.  
  1726. +++++++++++++++++++++++++++
  1727.  
  1728. >From amanda@intercon.com (Amanda Walker)
  1729. Date: Fri,  6 May 1994 14:14:32 -0500
  1730. Organization: InterCon Systems Corporation, Herndon, VA USA
  1731.  
  1732. jumplong@aol.com (Jump Long) writes:
  1733. > AppleShare could be written using FSM.  FSM is *not* limited to 
  1734. > file systems that use only local physical devices.
  1735.  
  1736. Hmm.  Perhaps I should rephrase this.  You are correct in that it is not 
  1737. limited to physical devices--my impression, though, is still that this is 
  1738. where it will be most useful.
  1739.  
  1740. > Amanda, I don't know why you think it has to be revised.
  1741.  
  1742. I'm not sure I can respond to this on the net without breaking my NDA... :)
  1743.  
  1744. > If you want a 
  1745. > more complete explanation of this, send me a Link at DEVSUPPORT next 
  1746. > week (when I'm back from sabbatical) and I'll be glad to discuss this 
  1747. > with you. 
  1748.  
  1749. I'll try and write up our comments an impressions.  We'll also be at the file 
  1750. system sessions at the WWDC; I'll try to have comments there as well.
  1751.  
  1752. Also, I'm sorry if I gave the impression that we don't appreciate the FSM and 
  1753. the work that has gone into it.  Far otherwise.  Even if we don't use it for 
  1754. NFS/Share (which is admittedly an extreme case as far as XFS's go :)), it's 
  1755. still an incredible improvement over rolling your own completely from scratch.
  1756.  
  1757. I hope it actually ships this time :).  Any word on the B-Tree Manager? 
  1758. (another thing that was originally planned for System 7...)
  1759.  
  1760.  
  1761. Amanda Walker
  1762. InterCon Systems Corporation
  1763.  
  1764.  
  1765.  
  1766. ---------------------------
  1767.  
  1768. >From adamnash@Xenon.Stanford.EDU (Adam Nash)
  1769. Subject: Help w- PPC and Time Tasks
  1770. Date: 6 May 1994 03:59:42 GMT
  1771. Organization: Computer Science Department, Stanford University.
  1772.  
  1773. Well, I'm making the jump to PPC with my previously unreleased animation
  1774. library.  I've run into one small problem.  I use a Time Manager task
  1775. to keep my animation running at the same speed on different machines.
  1776. However, my previous Time Task was a VERY simple bit of assembly,
  1777. and now I need to know what to do to get it to work, in C, on the PPC.
  1778.  
  1779. I'm using MW CodeWarrior Gold.
  1780.  
  1781. Basically, I have a structure declared as such:
  1782.  
  1783. struct myTimeTask {
  1784.     TMTask theTask;
  1785.     Boolean isTime;
  1786. };
  1787.  
  1788. I would then set the Boolean to false, and check it every loop.  My time
  1789. task just set it to true.  In THINK C, it looked like this:
  1790.  
  1791. void pascal PixieTimer(void)
  1792. {
  1793.     // on entry a pointer to our time task is in A1
  1794.     // TR 2.0 reference
  1795.     
  1796.     asm {
  1797.         move.b    #true, PixieTimeTask.isTime(A1)
  1798.     }
  1799. }
  1800.  
  1801. So, will some brave soul out there explain to me what I need to do to
  1802. 1) put this into C
  1803. 2) deal w/ all the UPP stuff?
  1804.  
  1805. Thanx,
  1806. Adam
  1807.  
  1808. +++++++++++++++++++++++++++
  1809.  
  1810. >From zstern@adobe.com (Zalman Stern)
  1811. Date: Fri, 6 May 1994 08:16:55 GMT
  1812. Organization: Adobe Systems Incorporated
  1813.  
  1814. Adam Nash writes
  1815. [Deleted.]
  1816. > So, will some brave soul out there explain to me what I need to do to
  1817. > 1) put this into C
  1818. > 2) deal w/ all the UPP stuff?
  1819.  
  1820. #ifdef __powerc
  1821.  
  1822. void PixelTimer(TMTask *theTask)
  1823. {
  1824.     struct myTimeTask *myTask = (struct myTimeTask *)theTask;
  1825.  
  1826.     myTask->isTime = true;
  1827. }
  1828.  
  1829. RoutineDescriptor PixelTimerRDS =
  1830.     BUILD_ROUTINE_DESCRIPTOR(uppTimerProcInfo, &PixelTimer);
  1831.  
  1832. #define PixelTimerRD (&PixelTimerRDS)
  1833.  
  1834. #else
  1835.  
  1836. /* 68K code from above. */
  1837.  
  1838. #define PixelTimerRD (&PixelTimer)
  1839.  
  1840. #endif
  1841.  
  1842. /* Somewhere else in your code. */
  1843.     myTask.tmAddr = PixelTimerRD;
  1844.  
  1845. --
  1846. Zalman Stern           zalman@adobe.com            (415) 962 3824
  1847. Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900
  1848.           There is no lust like the present.
  1849.  
  1850. +++++++++++++++++++++++++++
  1851.  
  1852. >From jberry@teleport.com (James D. Berry)
  1853. Date: Fri, 06 May 1994 08:58:15 -0700
  1854. Organization: Consultant
  1855.  
  1856. In article <2qcfbe$3dv@Times.Stanford.EDU>, adamnash@Xenon.Stanford.EDU
  1857. (Adam Nash) wrote:
  1858.  
  1859. > I would then set the Boolean to false, and check it every loop.  My time
  1860. > task just set it to true.  In THINK C, it looked like this:
  1861.  
  1862. If this is really all you need to do (and you can be assurred of the
  1863. extended time manager; a good bet these days), then you don't need to
  1864. bother with the assembly portion at all. The time manager will set bit 15
  1865. of the qType field in the tmTask when you call PrimeTime, and clear it when
  1866. the time period expires (it is also cleared when you call InsTime or
  1867. InsXTime).
  1868.  
  1869. So don't bother with the call-back or UPPs or any of that nonesense -- the
  1870. time manager is already doing for you essentially what you have been
  1871. redundantly doing in your callback.
  1872.  
  1873. This is documented in late time manager documentation (don't trust me on
  1874. the exact details!).
  1875. -- 
  1876. James Berry
  1877. jberry@teleport.com
  1878.  
  1879. ---------------------------
  1880.  
  1881. >From dlb@netcom.com (David Beauchesne)
  1882. Subject: How To Detect Screen Saver
  1883. Date: Thu, 5 May 1994 18:17:30 GMT
  1884. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1885.  
  1886. How can you detect (programmatically) that a screen saver, such as
  1887. After Dark, has become activated?
  1888.  
  1889. It doesn't seem to send a suspend event or anything.
  1890.  
  1891. Any help would be appreciated.
  1892.  
  1893.  
  1894. TIA
  1895. -- 
  1896. David L. Beauchesne                                    dlb@netcom.com
  1897. Santa Cruz, California, USA
  1898.  
  1899. +++++++++++++++++++++++++++
  1900.  
  1901. >From csuley@netcom.com (Christopher S. Suley)
  1902. Date: Fri, 6 May 1994 08:32:13 GMT
  1903. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1904.  
  1905. In article <dlbCpCDH7.8wE@netcom.com>, David Beauchesne <dlb@netcom.com> wrote:
  1906. >How can you detect (programmatically) that a screen saver, such as
  1907. >After Dark, has become activated?
  1908.  
  1909. Here's a routine I use to detect whether a screen saver is active:
  1910.  
  1911. Boolean
  1912. SaverOn( void )
  1913. {
  1914.   long  result;
  1915.  
  1916.   if ( GetMBarHeight() > 0 )
  1917.   {
  1918.     if ( Gestalt( 'SAVR', &result ) == noErr )
  1919.     {
  1920.       return( (result & 0x02) != 0 );
  1921.     }
  1922.     else
  1923.     {
  1924.       return( false );
  1925.     }
  1926.   }
  1927.  
  1928.   return( true );
  1929. }
  1930.  
  1931. I make use of two facts here. Most of the code floating around on the net
  1932. for hiding the menu bar sets the menu bar height to zero. If the menu bar
  1933. height is not zeroed, I try the way cool, modern Gestalt method pioneered
  1934. by the regrettably litigious Berkeley Systems.
  1935.  
  1936. Hope this helps!
  1937.  
  1938. -- 
  1939. Want some? <slap, thud>                                       csuley@netcom.com
  1940. Want some? <slap, thud>                                      ChrisSuley@aol.com
  1941.  
  1942. ---------------------------
  1943.  
  1944. >From tob@zardoz.ece.cmu.edu (Toby Smith)
  1945. Subject: Large device drivers: how to?
  1946. Date: 2 May 1994 20:54:40 GMT
  1947. Organization: Electrical and Computer Engineering
  1948.  
  1949. We're working on a device driver here which has quickly exceeded 32k in
  1950. size.  Now that we've reached that point (and spent a few days trimming
  1951. the fat), what do we do next?  I'm using THINK C, and in the Project
  1952. Type... dialog there is indeed an option for "Multi-segment" in the
  1953. device driver category, but when compiling with this option on (and our
  1954. code broken into two, <32k segments), I get a "resource too big" error
  1955. message when linking.  Is this a problem with THINK not knowing that the
  1956. main segment should be a DRVR and the others should be DCOD?  Instead of
  1957. working this way, must I instead have two separate projects, one for the
  1958. DRVR and another for the DCOD?
  1959.  
  1960. Assuming that this isn't a major problem (building the relevant
  1961. resources, that is), what's next?  We have an init which will load a
  1962. DRVR, but what do we do with the DCOD jobbies?  How do we set up the
  1963. jump table so the driver can find the routines it needs?
  1964.  
  1965. As you might guess, I'm a little confused on this whole topic.  If you
  1966. have experience with something like this, or can point me towards any
  1967. meaningful text on the subject, I'd be very appreciative. 
  1968.  
  1969. Thanks,
  1970. Tob
  1971.  
  1972.  
  1973. +++++++++++++++++++++++++++
  1974.  
  1975. >From resnick@cogsci.uiuc.edu (Pete Resnick)
  1976. Date: Wed, 04 May 1994 20:27:01 -0500
  1977. Organization: University of Illinois at Urbana-Champaign
  1978.  
  1979. In article <2q3pag$gt2@fs7.ece.cmu.edu>, tob@zardoz.ece.cmu.edu (Toby
  1980. Smith) wrote:
  1981.  
  1982. >We're working on a device driver here which has quickly exceeded 32k in
  1983. >size.  Now that we've reached that point (and spent a few days trimming
  1984. >the fat), what do we do next?  I'm using THINK C, and in the Project
  1985. >Type... dialog there is indeed an option for "Multi-segment" in the
  1986. >device driver category, but when compiling with this option on (and our
  1987. >code broken into two, <32k segments), I get a "resource too big" error
  1988. >message when linking.
  1989.  
  1990. Remember that THINK C counts up the total sizes of everything you put in a
  1991. single segment, including MacTraps and other libraries. Make sure that the
  1992. amount of code in each segment is <32K. Multisegment drivers work just
  1993. fine.
  1994.  
  1995. >Assuming that this isn't a major problem (building the relevant
  1996. >resources, that is), what's next?  We have an init which will load a
  1997. >DRVR, but what do we do with the DCOD jobbies?  How do we set up the
  1998. >jump table so the driver can find the routines it needs?
  1999.  
  2000. The multi-segment switch tells THINK C to generate it's own jump table, so
  2001. it will take care of this on its own. Now, as far as loading at INIT time,
  2002. you will probably want to get my device driver code. I have been working
  2003. on a couple of bug fixes for it (the latest released version, 2.2, has
  2004. several bugs), but I have been working on several other things and have
  2005. not completed it. Feel free to berate me with e-mail so that I finish
  2006. cleaning it up and send it out.
  2007.  
  2008. pr
  2009. -- 
  2010. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  2011. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  2012. System manager - Cognitive Science Group, Beckman Institute, UIUC
  2013. Internet: resnick@cogsci.uiuc.edu
  2014.  
  2015. +++++++++++++++++++++++++++
  2016.  
  2017. >From leblonk@netcom.com (Marcel Blonk)
  2018. Date: Thu, 5 May 1994 08:39:09 GMT
  2019. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2020.  
  2021. Toby Smith (tob@zardoz.ece.cmu.edu) wrote:
  2022. : We're working on a device driver here which has quickly exceeded 32k in
  2023. [text about problems with DRVR and DCOD resources]
  2024.  
  2025. Quick description of driver loading:
  2026.  
  2027. Since the INIT file will be closed after the init completes, all 
  2028. resources should be loaded and detached before this happens. Since the 
  2029. DCOD segment loader depends on opening 'DCOD' resources it is necessary 
  2030. to load all segments at inittime, and never unload (or even unlock) them, 
  2031. since any such action would prompt the segloader code to go look for the 
  2032. 'DCOD' resources again. The best/easiest/most compatible way to load a 
  2033. segment, is to simply call a routine within that segment. The segment 
  2034. loader will load the resource, MoveHHi (ouch, more about that later), and 
  2035. fill in the jumptable. If that is done for each segment, all DCOD 
  2036. resources should be detached (and of course whatever other resource you 
  2037. would like to keep around) (note, they are locked, but again, more 
  2038. about it later). Also, even before any of this, a 'DATA' segment is 
  2039. loaded by the DRVR entry code and detached. Don't worry about that one.
  2040. Now for the MoveHHi catch. Since this init time, and the driver is loaded 
  2041. into the system heap, it is absolutely undesirable that anything is 
  2042. MoveHHi and locked, if it is going to remain there (since this will limit 
  2043. to where the systemheap can shrink, not to mention heap fragmentation). 
  2044. The obvious solution, is to make all DCOD resources resSysHeap and 
  2045. resLocked. This will ensure that when the resource is loaded, it will be 
  2046. loaded low in the heap, and it will be locked, so the MoveHHi doesn't do 
  2047. anything (btw. if you want, you can make them preload also). Since Think 
  2048. C doesn't give you the option to specify the resource attributes of the 
  2049. DCOD resources and since I am a basically lazy person who doesn't enjoy 
  2050. going into ResEdit after every build, the following code, contains a 
  2051. kludge, which works, works safe, but which I would NOT use if I were to 
  2052. build a commercial shrinkwrap product (change the resource attributes 
  2053. with ResEdit after every non-debug build and #if DEBUG the kludge).
  2054. The kludge, btw, checks the resource attributes, changes them if 
  2055. necessary (wherein lies the problem. One should not change its own 
  2056. resource file like that. Although the kludge is safe, in that it will 
  2057. only change the attributes the first time the driver is loaded.)
  2058.  
  2059. I hope the following code will be clear enough to get the appropiate 
  2060. ideas. It was never used with Think C 6, so I don't know if it works with 
  2061. that (not as if I would garantee any of this code to work, all I can say 
  2062. is, I used it and it never failed on me). Think C 4 (if I recall correct) 
  2063. had main() in the DRVR resource. Think C 5 puts main() in on of the DCOD 
  2064. recources. The code given here is meant for Think C 5, but should be 
  2065. easily adaptable for other versions.
  2066.  
  2067.  
  2068. - ----------------------------------------------------------
  2069. #define PROJECT 'DRVR' or whatever code resource or 'APPL' if you're
  2070. using a test application project
  2071.  
  2072. /*
  2073.  *    include this in your main.c:
  2074.  *
  2075.  *        #define MAIN
  2076.  *        #include <segmentloader.h>
  2077.  *
  2078.  *        SEGSTART
  2079.  *            SEG( _seg1)        /* one entry for each segment
  2080.  *            SEG( _seg2)
  2081.  *        SEGEND
  2082.  *        if ( ResError() )
  2083.  *            oops!
  2084.  *
  2085.  *
  2086.  *
  2087.  *    include this once for each segment:
  2088.  *
  2089.  *        #include <segmentloader.h>
  2090.  *
  2091.  *        SEGMENT( _seg1)
  2092.  */
  2093.  
  2094. // the PROJECTNAME is included in each segment, just for debug/recognition
  2095. // purposes, feel free to remove it
  2096. #define SEGMENT(x)    static noname(){asm{dc.b "Segment: " PROJECTNAME 
  2097. "," 
  2098. #x}}void x(void);void x( void){}
  2099.  
  2100. #if PROJECT == 'APPL'
  2101.  
  2102. #define SEGSTART
  2103. #define SEG(x)
  2104. #define SEGEND
  2105.  
  2106. #else
  2107.  
  2108. #ifdef MAIN
  2109.  
  2110. #if PROJECT == 'DRVR'
  2111.  #define RESTYPE    'DCOD'
  2112. #else
  2113.  #define RESTYPE    'CCOD'
  2114. #endif
  2115.  
  2116. // the PROJECTNAME is included in this segment, just for debug/recognition
  2117. // purposes, feel free to remove it
  2118. static noname(){asm{dc.b "Segment: " PROJECTNAME ",MainSeg"}}
  2119.  
  2120. typedef void (*VSeg)( void);
  2121.  
  2122. #define SEGSTART    {int i=0;VSeg procs[16];int LoadSegs( VSeg [], int);
  2123. #define SEG(x)        {void x(void);procs[i++]=x;}
  2124. #define SEGEND        ResErr = LoadSegs( procs, i);}
  2125.  
  2126.  
  2127.  
  2128.  
  2129. void UnloadA4Seg( ProcPtr);
  2130.  
  2131. static int LoadSegs( VSeg seg[], int count);
  2132.  
  2133.  
  2134. static int LoadSegs( VSeg seg[], int count)
  2135. {
  2136. short            i, attr, wrongsegs, index;
  2137. OSErr            err;
  2138. register Handle    h;
  2139. THz                oldZone;
  2140. Handle            segments[ 32], mainseg;
  2141. short            id, mainid;
  2142. OSType            type;
  2143. unsigned char            s[ 256];
  2144.  
  2145.     oldZone = GetZone();
  2146.     SetZone( SysZone);
  2147.  
  2148. #if PROJECT == 'DRVR'
  2149. /* think 5.0 puts DRVR's main() in seperate DCOD resource */
  2150.     count++;
  2151. #endif
  2152.  
  2153.     mainseg = Get1IndResource( PROJECT, 1);
  2154.     if ( mainseg == nil )
  2155.     {    DebugStr( "\pno main segment");
  2156.         return( ResError());
  2157.     }
  2158.     GetResInfo( mainseg, &mainid, &type, s);
  2159.     if ( err = ResError() )
  2160.     {    DebugStr( "\pcould not get main segment info");
  2161.         return( err);
  2162.     }
  2163.  
  2164.     wrongsegs = 0;
  2165.     i = 0;
  2166.     for( index = Count1Resources( RESTYPE); index > 0; index--)
  2167.     {
  2168.         SetResLoad( false);
  2169.         h = Get1IndResource( RESTYPE, index);
  2170.         SetResLoad( true);
  2171.         if ( h == nil )
  2172.             break;
  2173.         GetResInfo( h, &id, &type, s);
  2174.         if ( (id & 0xffe0) == (0xf800 + ((mainid & 0x3f) << 5)) )
  2175.         {
  2176.             segments[ i++] = h;
  2177.             attr = GetResAttrs( h);
  2178.             if ( err = ResError() )
  2179.             {    DebugStr( "\presource error checking flags");
  2180.                 return( err);
  2181.             }
  2182.             if ( (attr & (resSysHeap | resLocked)) != 
  2183. (resSysHeap | 
  2184. resLocked) )
  2185.             {    SetResAttrs( h, attr | resSysHeap | resLocked);
  2186.                 wrongsegs++;
  2187.             }
  2188.         }
  2189.     }
  2190.  
  2191.     if ( i != count )
  2192.     {    DebugStr( "\pnot all segments are indentified");
  2193.         return( -1);
  2194.     }
  2195.  
  2196.     if ( wrongsegs != 0 )        // not all resource were loaded right
  2197.     {
  2198.         UpdateResFile( CurResFile());
  2199.  
  2200. /* unload all segments (might be in ApplZone) */
  2201.  
  2202.         for ( i = 0; i < count; i++)
  2203.             UnloadA4Seg( seg[i]);
  2204.  
  2205. /* attributes were wrong, release 'm, so as to not have 'm remain in the 
  2206. ApplZone */
  2207.         for ( i = 0; i < count; i++)
  2208.         {    h = segments[i];
  2209.             if ( *h != 0L )
  2210.                 ReleaseResource( h);
  2211.         }
  2212.     }
  2213.  
  2214. /* load all segments (again) */
  2215.  
  2216.     for ( i = 0; i < count; i++)
  2217.         (*(seg[i]))();
  2218.  
  2219. /* detach all resources */
  2220.  
  2221.     for ( i = 0; i < count; i++)
  2222.     {    h = segments[i];
  2223.         DetachResource( h);
  2224.         if ( err = ResError() )
  2225.         {    DebugStr( "\presource error detaching resources");
  2226.             return( err);
  2227.         }
  2228.     }
  2229.  
  2230.     DetachResource( mainseg);
  2231.     if ( err = ResError() )
  2232.     {    DebugStr( "\presource error detaching main resource");
  2233.         return( err);
  2234.     }
  2235.  
  2236.     SetZone( oldZone);
  2237.     return( noErr);
  2238. }
  2239.  
  2240. #endif        // #ifdef MAIN
  2241.  
  2242. #endif        // #if PROJECT == 'APPL'
  2243.  
  2244.  
  2245. +++++++++++++++++++++++++++
  2246.  
  2247. >From tob@zardoz.ece.cmu.edu (Toby Smith)
  2248. Date: 6 May 1994 19:54:02 GMT
  2249. Organization: Electrical and Computer Engineering
  2250.  
  2251. Pete Resnick (resnick@cogsci.uiuc.edu) wrote:
  2252. : In article <2q3pag$gt2@fs7.ece.cmu.edu>, tob@zardoz.ece.cmu.edu (Toby
  2253. : Smith) wrote:
  2254.  
  2255. : >We're working on a device driver here which has quickly exceeded 32k in
  2256. : >size.  Now that we've reached that point (and spent a few days trimming
  2257. : >the fat), what do we do next?  I'm using THINK C, and in the Project
  2258. : >Type... dialog there is indeed an option for "Multi-segment" in the
  2259. : >device driver category, but when compiling with this option on (and our
  2260. : >code broken into two, <32k segments), I get a "resource too big" error
  2261. : >message when linking.
  2262.  
  2263. : Remember that THINK C counts up the total sizes of everything you put in a
  2264. : single segment, including MacTraps and other libraries. Make sure that the
  2265. : amount of code in each segment is <32K. Multisegment drivers work just
  2266. : fine.
  2267.  
  2268. Okay, maybe I have a magically stupid version of THINK C (or maybe I'm
  2269. the one who's magically stupid...).  The total size of my code is around
  2270. 34k at this point.  I'm using no libraries whatsoever.  I've split that
  2271. 34k of code up into, lessee, 5 segments now just to be spiteful towards
  2272. the "resource too big" error messages I continue to receive every time I
  2273. try to do "Build device driver."  None of my individual segments exceeds
  2274. 11k at this point, and I'm still receiving that error message (and I do
  2275. indeed have the multi-segment option checked in the Device Driver dialog
  2276. box).  I couldn't hope to be more frustrated here.  Any suggestions?
  2277.  
  2278. Tob
  2279.  
  2280.  
  2281.  
  2282. +++++++++++++++++++++++++++
  2283.  
  2284. >From leblonk@netcom.com (Marcel Blonk)
  2285. Date: Sat, 7 May 1994 12:01:52 GMT
  2286. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2287.  
  2288. Toby Smith (tob@zardoz.ece.cmu.edu) wrote:
  2289. : : >We're working on a device driver here which has quickly exceeded 32k in
  2290. []
  2291. : : >Type... dialog there is indeed an option for "Multi-segment" in the
  2292. : : >device driver category, but when compiling with this option on (and our
  2293. : : >code broken into two, <32k segments), I get a "resource too big" error
  2294. : : >message when linking.
  2295. []
  2296. : Okay, maybe I have a magically stupid version of THINK C (or maybe I'm
  2297. : the one who's magically stupid...).  The total size of my code is around
  2298. : 34k at this point.  I'm using no libraries whatsoever.  I've split that
  2299. : 34k of code up into, lessee, 5 segments now just to be spiteful towards
  2300. : the "resource too big" error messages I continue to receive every time I
  2301. : try to do "Build device driver."  None of my individual segments exceeds
  2302. : 11k at this point, and I'm still receiving that error message (and I do
  2303. : indeed have the multi-segment option checked in the Device Driver dialog
  2304. : box).  I couldn't hope to be more frustrated here.  Any suggestions?
  2305.  
  2306. Maybe it's the DATA segment that's being too big. When you made the 
  2307. driver into a multi segment project, suddenly all the intersegment calls 
  2308. are adding their 6 bytes each to the jumptable, which resides in the DATA 
  2309. resource. So, the solution might be to remove static alloctated data 
  2310. and change it to dynamically allocated.
  2311.  
  2312. mb
  2313.  
  2314.  
  2315. ---------------------------
  2316.  
  2317. >From kidwell@wam.umd.edu (Christopher Bruce Kidwell)
  2318. Subject: Taxes on shareware fees
  2319. Date: 13 Apr 1994 21:29:10 GMT
  2320. Organization: University of Maryland, College Park
  2321.  
  2322. As tax time for us US folks rolls around, I was curious about what to do
  2323. about shareware payments received. Do small-time shareware authors out
  2324. there report their income? What about foreign income?
  2325.  
  2326. Chris Kidwell
  2327. kidwell@wam.umd.edu
  2328.  
  2329. +++++++++++++++++++++++++++
  2330.  
  2331. >From ellens@bnr.ca (Chris Ellens)
  2332. Date: Wed, 13 Apr 1994 18:06:49 -0400
  2333. Organization: BNR
  2334.  
  2335. In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2336. (Christopher Bruce Kidwell) wrote:
  2337.  
  2338. > As tax time for us US folks rolls around, I was curious about what to do
  2339. > about shareware payments received. Do small-time shareware authors out
  2340. > there report their income? What about foreign income?
  2341. > Chris Kidwell
  2342. > kidwell@wam.umd.edu
  2343.  
  2344. I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if
  2345. I did, I'd declare the shareware fees as business income, and then write
  2346. off my mailing expenses, my development software, and depreciation on my
  2347. new PowerMac (and maybe a few business lunches) as expenses and claim the
  2348. loss against my regular income.
  2349. -- 
  2350. Chris Ellens
  2351. ellens@bnr.ca
  2352.  
  2353. +++++++++++++++++++++++++++
  2354.  
  2355. >From omh@cs.brown.edu (Owen M. Hartnett)
  2356. Date: Thu, 14 Apr 1994 03:58:11 GMT
  2357. Organization: Brown University Department of Computer Science
  2358.  
  2359. In article <1994Apr14.025106.6190@news.yale.edu> owenc@minerva.cis.yale.edu (Christopher Owen) writes:
  2360. >Chris Ellens (ellens@bnr.ca) wrote:
  2361. >
  2362. >: I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if
  2363. >: I did, I'd declare the shareware fees as business income, and then write
  2364. >: off my mailing expenses, my development software, and depreciation on my
  2365. >: new PowerMac (and maybe a few business lunches) as expenses and claim the
  2366. >: loss against my regular income.
  2367. >
  2368. >Well it doesn't quite work that way.  Unless you spend a LOT of time on
  2369. >the shareware your loses are limited to your income from the activity. 
  2370. >Still you can write all you shareware income off pretty easily though.
  2371.  
  2372.  
  2373. This is correct. If you have any "outside" income over a certain very
  2374. minimal amount, you must report it either as miscellaneous income or file
  2375. a Schedule C - sole proprietorship. You report both domestic and foreign
  2376. income. You can report it as miscellaneous if you don't want to bother
  2377. with a schedule C, but you can't write off anything against it.
  2378.  
  2379. Filing a schedule C is a definite advantage to you, as you can write off
  2380. your expenses incurred against the income you made. If you show a definite
  2381. business intent (meant by the IRS as "you really truly intended to make
  2382. a profit" and you show a profit for 3 out of 5 years (this may have been
  2383. broadened a bit)) then in your loss years you can write off your losses
  2384. vs. your ordinary income. Otherwise, your income is assumed to be hobby
  2385. income and your expenses can only be written off against the hobby income.
  2386.  
  2387. There are definite advantages to filing a schedule C and you may want to
  2388. consider them. Also consider the fact that, while you must report all
  2389. your income, you plan your own purchases, so you do
  2390. control whether or not your venture is profitable for a given year.
  2391.  
  2392. -Owen
  2393.  
  2394. -- 
  2395. Owen Hartnett                omh@cs.brown.edu
  2396. "FAITH, n. Belief without evidence in what is told by one who speaks
  2397.         without knowledge, of things without parallel."
  2398.             -Ambrose Bierce - The Devil's Dictionary
  2399.  
  2400. +++++++++++++++++++++++++++
  2401.  
  2402. >From Scott_Gruby@hmc.edu (Scott Gruby)
  2403. Date: Wed, 13 Apr 1994 19:22:11 -0700
  2404. Organization: Harvey Mudd College, Claremont CA
  2405.  
  2406. In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2407. (Christopher Bruce Kidwell) wrote:
  2408.  
  2409. > As tax time for us US folks rolls around, I was curious about what to do
  2410. > about shareware payments received. Do small-time shareware authors out
  2411. > there report their income? What about foreign income?
  2412. > Chris Kidwell
  2413. > kidwell@wam.umd.edu
  2414.  
  2415. Unfortunately I don't have a direct answer to this question and I don't
  2416. plan on doing research until next year at tax time (I just started this
  2417. year); but I do have some information on state sales tax in
  2418. California...basically you don't have to collect it and people don't have
  2419. to pay it. That's what the Board of Equalization told me yesterday.
  2420.  
  2421. Something California shareware authors may want to note.
  2422.  
  2423. -- 
  2424. Scott Allen Gruby                         (Scott_Gruby@hmc.edu)
  2425. Macintosh Student System Manager
  2426. Academic Computing, Harvey Mudd College
  2427. Claremont, CA
  2428.          Finger ripem_public@eagle.st.hmc.edu for public key
  2429.  
  2430. +++++++++++++++++++++++++++
  2431.  
  2432. >From owenc@minerva.cis.yale.edu (Christopher Owen)
  2433. Date: Thu, 14 Apr 1994 02:51:06 GMT
  2434. Organization: Yale Center for International and Area Studies
  2435.  
  2436. Chris Ellens (ellens@bnr.ca) wrote:
  2437.  
  2438. : I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if
  2439. : I did, I'd declare the shareware fees as business income, and then write
  2440. : off my mailing expenses, my development software, and depreciation on my
  2441. : new PowerMac (and maybe a few business lunches) as expenses and claim the
  2442. : loss against my regular income.
  2443.  
  2444. Well it doesn't quite work that way.  Unless you spend a LOT of time on
  2445. the shareware your loses are limited to your income from the activity. 
  2446. Still you can write all you shareware income off pretty easily though.
  2447.  
  2448. Chris
  2449.  
  2450. --
  2451. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2452. 27 Bishop           ~  Voice: (203) 772-3382  ~  owenc@minerva.cis.yale.edu
  2453. New Haven CT 06511  ~  Data : (203) 772-4485  ~      finger for PGP key
  2454. - -------------------------------------------------------------------------
  2455.                      Different _can_ mean inferior
  2456. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2457.  
  2458.  
  2459. +++++++++++++++++++++++++++
  2460.  
  2461. >From resnick@cogsci.uiuc.edu (Pete Resnick)
  2462. Date: Thu, 14 Apr 1994 00:02:18 -0500
  2463. Organization: University of Illinois at Urbana-Champaign
  2464.  
  2465. In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2466. (Christopher Bruce Kidwell) wrote:
  2467.  
  2468. >As tax time for us US folks rolls around, I was curious about what to do
  2469. >about shareware payments received. Do small-time shareware authors out
  2470. >there report their income? What about foreign income?
  2471.  
  2472. I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2473. Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2474. also depreciate my computer and programming tools (compiler, Inside Mac,
  2475. etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2476. in the butt to figure out, but that's where you can take off part of the
  2477. cost of equipment, etc.
  2478.  
  2479. pr
  2480. -- 
  2481. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  2482. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  2483. System manager - Cognitive Science Group, Beckman Institute, UIUC
  2484. Internet: resnick@cogsci.uiuc.edu
  2485.  
  2486. +++++++++++++++++++++++++++
  2487.  
  2488. >From gdl@stlawrence.maths (Greg Landweber)
  2489. Date: 14 Apr 1994 10:53:44 GMT
  2490. Organization: (none)
  2491.  
  2492. In article <resnick-140494000218@ruger-6.slip.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  2493.    In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2494.    (Christopher Bruce Kidwell) wrote:
  2495.  
  2496.    >As tax time for us US folks rolls around, I was curious about what to do
  2497.    >about shareware payments received. Do small-time shareware authors out
  2498.    >there report their income? What about foreign income?
  2499.  
  2500.    I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2501.    Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2502.    also depreciate my computer and programming tools (compiler, Inside Mac,
  2503.    etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2504.    in the butt to figure out, but that's where you can take off part of the
  2505.    cost of equipment, etc.
  2506.  
  2507. I do the same thing, except that on form 4562, I declare all my
  2508. computer-related expenses as Section 179 deductions.  That way, you
  2509. deduct the entire cost the first year and don't have to worry about
  2510. the various percentages for depreciation.  The limit for Section 179
  2511. deductions is $17,500.  Is there any reason why I shouldn't do this
  2512. (my shareware income is higher than the total cost of the hardware I
  2513. buy, so declaring Section 179 doesn't give me a loss)?
  2514.  
  2515. -- Greg Landweber
  2516.    gdl@maths.ox.ac.uk
  2517.  
  2518. +++++++++++++++++++++++++++
  2519.  
  2520. >From giles@med.cornell.edu (Aaron Giles)
  2521. Date: Thu, 14 Apr 1994 09:10:20 -0500
  2522. Organization: Cornell University Medical College
  2523.  
  2524. In article <1994Apr14.025106.6190@news.yale.edu>,
  2525. owenc@minerva.cis.yale.edu (Christopher Owen) wrote:
  2526.  
  2527. > Well it doesn't quite work that way.  Unless you spend a LOT of time on
  2528. > the shareware your loses are limited to your income from the activity. 
  2529. > Still you can write all you shareware income off pretty easily though.
  2530.  
  2531. Actually, beginning this year that restriction has been lifted.  As long
  2532. as you have other income, you can end up with a loss for your business and
  2533. subtract that from your net income for purposes of calculating your taxes.
  2534.  
  2535. Aaron
  2536. -- 
  2537. Aaron Giles
  2538. Power Macintosh & Newton Developer
  2539. Cornell University Medical College
  2540. giles@med.cornell.edu
  2541.  
  2542. +++++++++++++++++++++++++++
  2543.  
  2544. >From ari@world.std.com (Ari I Halberstadt)
  2545. Date: Thu, 14 Apr 1994 16:29:42 GMT
  2546. Organization: The World Public Access UNIX, Brookline, MA
  2547.  
  2548. In article <2oho76$7mq@cville-srv.wam.umd.edu>,
  2549. Christopher Bruce Kidwell <kidwell@wam.umd.edu> wrote:
  2550. >As tax time for us US folks rolls around, I was curious about what to do
  2551. >about shareware payments received. Do small-time shareware authors out
  2552. >there report their income? What about foreign income?
  2553. >
  2554. >Chris Kidwell
  2555. >kidwell@wam.umd.edu
  2556.  
  2557. You have to pay taxes on just about all income you receive. You may
  2558. have to pay both state and federal taxes on your income. I think that
  2559. this would fall under the tax rules for self employed individuals or
  2560. small businesses.  This means that if you earned more than about $400
  2561. dollars, then you will have to pay federal income tax, social
  2562. security, medicaid and medicare, and state income tax. If you received
  2563. shareware payments from people within your state of business, then you
  2564. will also have to pay any state sales tax. At any rate, you will
  2565. certainly have to report your income to the government. You may be
  2566. able to take certain deductions on your taxes if they relate to your
  2567. work, such as computer books, hardware, and software. Unforuntately,
  2568. home office deductions are not too easy to take these days.
  2569.  
  2570. It isn't especially difficult to get all the relevant forms and fill
  2571. them out, but it can be a pain, especially if you've already got a job
  2572. and already had to fill out forms for it. Considering the late date,
  2573. you can always file an ammended return, but of course you'll owe any
  2574. interest on unpaid taxes. If you actually got a significant amount of
  2575. money in shareware fees, it may push your income into a heigher income
  2576. bracket; this may not have been what you wanted to happen... What you
  2577. really don't want to have to do (since it can be a bit of a pain) is
  2578. have to file estimated taxes for each year, but you may have no choice
  2579. in the matter.
  2580.  
  2581. You may not have to pay taxes if you earned less than a certain amount
  2582. on your shareware fees, or if your activity is considered a hobby (by
  2583. IRS and/or state tax rules).
  2584.  
  2585. I'm crossposting this to alt.computer.consultants, since, as I recall,
  2586. that was a good forum for discussing this sort of stuff. I haven't
  2587. read that group in a while though, so if this topic is inappropriate
  2588. please forgive me.
  2589.  
  2590. Disclaimer: I'm not a CPA, just a self-employed programmer. As usual,
  2591. don't trust any legal or tax advice you get on the net. Find the
  2592. relevant IRS documentation and read it. The IRS publishes several
  2593. books for small businesses that make figuring this all out much
  2594. simpler. There are also plenty of good tax guides out there for small
  2595. businesses, but always read the IRS literature, just to be sure.
  2596. -- 
  2597. Ari Halberstadt    ari@world.std.com     #include <std/disclaimer.h>
  2598. "These beetles were long considered to be very rare because very few
  2599. entomologists look for beetles in the mountains, in winter, at night,
  2600. during snow storms." -- Purves W. K., et al, "Life: The Science of
  2601.  
  2602. +++++++++++++++++++++++++++
  2603.  
  2604. >From jvp@tools1.ee.iastate.edu (Jim Van Peursem)
  2605. Date: 14 Apr 94 18:32:47 GMT
  2606. Organization: Iowa State University, Ames, Iowa
  2607.  
  2608. In <GDL.94Apr14115344@stlawrence.maths> gdl@stlawrence.maths (Greg Landweber) writes:
  2609.  
  2610. >I do the same thing, except that on form 4562, I declare all my
  2611. >computer-related expenses as Section 179 deductions.  That way, you
  2612. >deduct the entire cost the first year and don't have to worry about
  2613. >the various percentages for depreciation.  The limit for Section 179
  2614. >deductions is $17,500.  Is there any reason why I shouldn't do this
  2615. >(my shareware income is higher than the total cost of the hardware I
  2616. >buy, so declaring Section 179 doesn't give me a loss)?
  2617.  
  2618.   Slight clarification. The limit is the lesser of $17,500 and your
  2619. net income without the 179 deduction. This basically means that you
  2620. can't show a loss from any 179 deductions.
  2621.  
  2622. +---------------------------------------------------------------+
  2623. | Jim Van Peursem - Ph.D. Candidate      (Ham Radio -> KE0PH)   |
  2624. | Department of Electrical Engineering and Computer Engineering |
  2625. | Iowa State University - Ames, IA 50011 : (515) 294-8339       |
  2626. | internet - jvp@iastate.edu  -or-  jvp@cpre1.ee.iastate.edu    |
  2627. +---------------------------------------------------------------+
  2628.  
  2629. +++++++++++++++++++++++++++
  2630.  
  2631. >From sbill@informix.com (Bill Stackhouse)
  2632. Date: 14 Apr 1994 18:20:55 GMT
  2633. Organization: Informix Software, Inc.
  2634.  
  2635. >>As tax time for us US folks rolls around, I was curious about what to do
  2636. >>about shareware payments received. Do small-time shareware authors out
  2637. >>there report their income? What about foreign income?
  2638. >
  2639. >I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2640. >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2641. >also depreciate my computer and programming tools (compiler, Inside Mac,
  2642. >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2643. >in the butt to figure out, but that's where you can take off part of the
  2644. >cost of equipment, etc.
  2645.  
  2646. Something to keep in mind is hardware purchases up to 17,500 can be
  2647. written off in the year of purchase using section 179 of form 4562. Software
  2648. does not fall into this areas and must be depreciated over 3 years. A good
  2649. tax program helps alot tracking all of this. Calling software purchases
  2650. an office expense is an idea but not proper. Don't forget Home business
  2651. use but make sure that you have the area solely for business. Look at
  2652. the form C to find what catagories of expenses you need to track during
  2653. the year. Time you spend developing the software cannot be treated as
  2654. an expense, only if you contract someone else to develop it. 
  2655.  
  2656. Bill
  2657.  
  2658.  
  2659.  
  2660. +++++++++++++++++++++++++++
  2661.  
  2662. >From wdh@netcom.com (Bill Hofmann)
  2663. Date: Fri, 15 Apr 1994 01:24:21 GMT
  2664. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2665.  
  2666. resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  2667.  
  2668. >I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2669. >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2670. >also depreciate my computer and programming tools (compiler, Inside Mac,
  2671. >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2672. >in the butt to figure out, but that's where you can take off part of the
  2673. >cost of equipment, etc.
  2674. You may already be doing it, but you should be aware that you can convert
  2675. a certain amount of capital equipment (computer, software, "library") to
  2676. expense under Sec 179.  The limit was $10k/year, it just went up.  This
  2677. way you can avoid depreciation.  Also, according to my accountant,
  2678. software is a 3-year depreciation item.
  2679. -- 
  2680. -Bill Hofmann                    wdh@netcom.COM
  2681.  Fresh Software and Instructional Design    +1 510 524 0852
  2682.  
  2683. +++++++++++++++++++++++++++
  2684.  
  2685. >From gdl@stlawrence.maths (Greg Landweber)
  2686. Date: 15 Apr 1994 00:54:11 GMT
  2687. Organization: (none)
  2688.  
  2689. In article <2ok1i7$hpa@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes:
  2690.    Something to keep in mind is hardware purchases up to 17,500 can be
  2691.    written off in the year of purchase using section 179 of form 4562. Software
  2692.    does not fall into this areas and must be depreciated over 3 years.
  2693.  
  2694. Really?  Where does it say this about software?  I deducted my
  2695. software purchases using section 179.  I hope that wasn't a mistake.
  2696. I seem to recall there being something in the tax instructions about
  2697. expenses for developing software can be deducted as current expenses.
  2698. And I read it all so carefully, too...
  2699.  
  2700. What about software upgrades?  If I shell out money for a new compiler
  2701. upgrade each year, do I have to depreciate all these purchases over
  2702. three years?
  2703.  
  2704. -- Greg "Buttons" Landweber
  2705.    gdl@maths.ox.ac.uk
  2706.  
  2707. +++++++++++++++++++++++++++
  2708.  
  2709. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  2710. Date: Thu, 14 Apr 1994 03:24:06 GMT
  2711. Organization: Syracuse University, CIS Dept.
  2712.  
  2713. In article <2oho76$7mq@cville-srv.wam.umd.edu> kidwell@wam.umd.edu (Christopher Bruce Kidwell) writes:
  2714.  
  2715. >As tax time for us US folks rolls around, I was curious about what to do
  2716. >about shareware payments received. Do small-time shareware authors out
  2717. >there report their income? What about foreign income?
  2718.  
  2719. I do.  If you're a shareware author who has received income, I hate to
  2720. say it, but you're a bit late in considering this question!
  2721.  
  2722. Dealing with the income requires that you file a Schedule C (sole
  2723. proprietorship income), which also means you'll have to file a form 1040 (long
  2724. form).  You'll almost certainly want to deduct relevant business expenses,
  2725. which is a nontrivial task, and requires depreciating many expenses.  (Some
  2726. expenses can be deducted at one time.)
  2727.  
  2728. This is all complicated, to the say the least, and is certainly not something
  2729. a novice is likely to get done right in two days.  If you're in this situation,
  2730. you should seriously consider filing for an extension, and enlisting the
  2731. aid of a competent professional.
  2732.  
  2733. Personally, I found I was able to handle my own returns (the last two years)
  2734. using TaxCut--but I left myself plenty of time to research depreciation
  2735. schedules and other related items.
  2736.  
  2737. As for foreign income, I treat shareware fees received from foreign users
  2738. exactly the same as those received from domestic users.
  2739.  
  2740.  
  2741. Good luck.
  2742.  
  2743.  
  2744. -- 
  2745. J. S. Greenfield                                         greeny@top.cis.syr.edu
  2746. (I like to put 'greeny' here, 
  2747. but my d*mn system wants a 
  2748. *real* name!)                        "What's the difference between an orange?"
  2749.  
  2750. +++++++++++++++++++++++++++
  2751.  
  2752. >From sbill@informix.com (Bill Stackhouse)
  2753. Date: 15 Apr 1994 16:27:31 GMT
  2754. Organization: Informix Software, Inc.
  2755.  
  2756. In article <wdhCoA18M.B6t@netcom.com- wdh@netcom.com (Bill Hofmann) writes:
  2757. -resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  2758. -
  2759. --I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2760. --Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2761. --also depreciate my computer and programming tools (compiler, Inside Mac,
  2762. --etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2763. --in the butt to figure out, but that's where you can take off part of the
  2764. --cost of equipment, etc.
  2765. -You may already be doing it, but you should be aware that you can convert
  2766. -a certain amount of capital equipment (computer, software, "library") to
  2767. -expense under Sec 179.  The limit was $10k/year, it just went up.  This
  2768. -way you can avoid depreciation.  Also, according to my accountant,
  2769. -software is a 3-year depreciation item.
  2770. - - 
  2771. --Bill Hofmann                    wdh@netcom.COM
  2772. - Fresh Software and Instructional Design    +1 510 524 0852
  2773.  
  2774. Software and books cannot be included as a section 179 expense. Software
  2775. must be depreciated over 3 years and books over 7 years.
  2776.  
  2777. Bill
  2778.  
  2779.  
  2780.  
  2781. +++++++++++++++++++++++++++
  2782.  
  2783. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  2784. Date: Thu, 14 Apr 1994 14:56:54 GMT
  2785. Organization: Syracuse University, CIS Dept.
  2786.  
  2787. Chris Ellens (ellens@bnr.ca) wrote:                                        
  2788.  
  2789. >: I haven't written any shareware, and I don't pay taxes to Uncle Sam, but if
  2790. >: I did, I'd declare the shareware fees as business income, and then write
  2791. >: off my mailing expenses, my development software, and depreciation on my
  2792. >: new PowerMac (and maybe a few business lunches) as expenses and claim the
  2793. >: loss against my regular income.
  2794. >
  2795. >Well it doesn't quite work that way.  Unless you spend a LOT of time on
  2796. >the shareware your loses are limited to your income from the activity.
  2797.  
  2798. This is not correct.  As long as you treat the venture as a business (i.e.,
  2799. you make a genuine effort to turn a profit) rather than as a hobby, your
  2800. losses are not limited to your income.
  2801.  
  2802. There is no specific requirement as to how much time you must spend on
  2803. the activity.
  2804.  
  2805.  
  2806. Owen M. Hartnett (omh@cs.brown.edu) writes:
  2807.  
  2808. >Filing a schedule C is a definite advantage to you, as you can write off
  2809. >your expenses incurred against the income you made. If you show a definite
  2810. >business intent (meant by the IRS as "you really truly intended to make
  2811. >a profit" and you show a profit for 3 out of 5 years (this may have been
  2812. >broadened a bit)) then in your loss years you can write off your losses
  2813. >vs. your ordinary income. Otherwise, your income is assumed to be hobby
  2814. >income and your expenses can only be written off against the hobby income.
  2815.  
  2816. The 3 out of 5 rule is no longer law.  Under current law, you need only
  2817. treat the activity as a genuine business (intended to turn a profit).
  2818. Don't ask me how you would prove this if you consistently show a loss
  2819. (or more to the point, how the IRS would prove the activity was not a
  2820. business).
  2821.  
  2822.  
  2823. >There are definite advantages to filing a schedule C and you may want to
  2824. >consider them. Also consider the fact that, while you must report all
  2825. >your income, you plan your own purchases, so you do
  2826. >control whether or not your venture is profitable for a given year.
  2827.  
  2828. Maybe, maybe not.  Unexpected expenses can always change things.
  2829.  
  2830.  
  2831. -- 
  2832. J. S. Greenfield                                         greeny@top.cis.syr.edu
  2833. (I like to put 'greeny' here, 
  2834. but my d*mn system wants a 
  2835. *real* name!)                        "What's the difference between an orange?"
  2836.  
  2837. +++++++++++++++++++++++++++
  2838.  
  2839. >From rba26@cas.org (Brad Andrews)
  2840. Date: Fri, 15 Apr 1994 17:57:53 GMT
  2841. Organization: Chemical Abstracts Service
  2842.  
  2843. In article B6t@netcom.com, wdh@netcom.com (Bill Hofmann) writes:
  2844. ]resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  2845. ]
  2846. ]>I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2847. ]>Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2848. ]>also depreciate my computer and programming tools (compiler, Inside Mac,
  2849. ]>etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2850. ]>in the butt to figure out, but that's where you can take off part of the
  2851. ]>cost of equipment, etc.
  2852. ]You may already be doing it, but you should be aware that you can convert
  2853. ]a certain amount of capital equipment (computer, software, "library") to
  2854. ]expense under Sec 179.  The limit was $10k/year, it just went up.  This
  2855. ]way you can avoid depreciation.  Also, according to my accountant,
  2856. ]software is a 3-year depreciation item.
  2857.  
  2858. With nearly yearly upgrades, something is wrong with a 3 year depreciation
  2859. of software.
  2860.  
  2861. Where is the Sec 179 info supposed to go?  Right on the Schedule C, or
  2862. somewhere else?
  2863.  
  2864. - -
  2865.  
  2866. Brad Andrews
  2867. Brad.Andrews@cas.org
  2868. All opinions are strictly mine
  2869.  
  2870.  
  2871. +++++++++++++++++++++++++++
  2872.  
  2873. >From omh@cs.brown.edu (Owen M. Hartnett)
  2874. Date: Fri, 15 Apr 1994 19:38:11 GMT
  2875. Organization: Brown University Department of Computer Science
  2876.  
  2877. In article <1994Apr14.145654.16454@newstand.syr.edu> greeny@top.cis.syr.edu (J. S. Greenfield) writes:
  2878. >Owen M. Hartnett (omh@cs.brown.edu) writes:
  2879. >
  2880. >>Filing a schedule C is a definite advantage to you, as you can write off
  2881. >>your expenses incurred against the income you made. If you show a definite
  2882. >>business intent (meant by the IRS as "you really truly intended to make
  2883. >>a profit" and you show a profit for 3 out of 5 years (this may have been
  2884. >>broadened a bit)) then in your loss years you can write off your losses
  2885. >>vs. your ordinary income. Otherwise, your income is assumed to be hobby
  2886. >>income and your expenses can only be written off against the hobby income.
  2887. >
  2888. >The 3 out of 5 rule is no longer law.  Under current law, you need only
  2889. >treat the activity as a genuine business (intended to turn a profit).
  2890. >Don't ask me how you would prove this if you consistently show a loss
  2891. >(or more to the point, how the IRS would prove the activity was not a
  2892. >business).
  2893. >
  2894. The 3 out of 5 was never law, it was an IRS ruling that they would 
  2895. consider a business to be non-hobby given that the business made a
  2896. profit for 3 out of 5 years. You could always, then and now, made a
  2897. point that the business was truly a business based on other factors.
  2898.  
  2899. Consider the business, newly started, which loses money tremendously in
  2900. a year and ends up getting closed down. Certainly this wouldn't meet the
  2901. 3 out of 5 rule, but the IRS wouldn't consider it a hobby. However, you
  2902. can probably be assured that if you show a profit 3 out of 5 years, you
  2903. won't be considered a hobby.
  2904.  
  2905. >
  2906. >>There are definite advantages to filing a schedule C and you may want to
  2907. >>consider them. Also consider the fact that, while you must report all
  2908. >>your income, you plan your own purchases, so you do
  2909. >>control whether or not your venture is profitable for a given year.
  2910. >
  2911. >Maybe, maybe not.  Unexpected expenses can always change things.
  2912.  
  2913. Even so, the timing of those expenses is under your control.
  2914.  
  2915. -Owen
  2916.  
  2917. -- 
  2918. Owen Hartnett                omh@cs.brown.edu
  2919. "FAITH, n. Belief without evidence in what is told by one who speaks
  2920.         without knowledge, of things without parallel."
  2921.             -Ambrose Bierce - The Devil's Dictionary
  2922.  
  2923. +++++++++++++++++++++++++++
  2924.  
  2925. >From gdl@stlawrence.maths (Greg Landweber)
  2926. Date: 16 Apr 1994 03:15:28 GMT
  2927. Organization: (none)
  2928.  
  2929. In article <1994Apr15.175753.3639@chemabs.uucp> rba26@cas.org (Brad Andrews) writes:
  2930.    With nearly yearly upgrades, something is wrong with a 3 year depreciation
  2931.    of software.
  2932.  
  2933. I counted my software purchases as a Section 179 deduction.  Is this wrong?
  2934.  
  2935.    Where is the Sec 179 info supposed to go?  Right on the Schedule C, or
  2936.    somewhere else?
  2937.  
  2938. Section 179 info goes on form 4562.  It is all explained (rather
  2939. poorly) in the instructions for that form.
  2940.  
  2941. -- Greg Landweber
  2942.    gdl@maths.ox.ac.uk
  2943.  
  2944. +++++++++++++++++++++++++++
  2945.  
  2946. >From hall_j@sat.mot.com (Joseph Hall)
  2947. Date: Thu, 14 Apr 1994 22:06:25 GMT
  2948. Organization: Motorola Inc., Satellite Communications
  2949.  
  2950. Seems it was resnick@cogsci.uiuc.edu (Pete Resnick) who said:
  2951. >In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  2952. >(Christopher Bruce Kidwell) wrote:
  2953. >
  2954. >>As tax time for us US folks rolls around, I was curious about what to do
  2955. >>about shareware payments received. Do small-time shareware authors out
  2956. >>there report their income? What about foreign income?
  2957. >
  2958. >I report it all on the 1040 and file the Schedule C (Profit or Loss From
  2959. >Business, Sole Proprietorship) and Schedule SE (Self-Employment Tax). I
  2960. >also depreciate my computer and programming tools (compiler, Inside Mac,
  2961. >etc.) on Form 4562 (Depreciation and Amortization). 4562 is the real pain
  2962. >in the butt to figure out, but that's where you can take off part of the
  2963. >cost of equipment, etc.
  2964.  
  2965. If you're like me, you pay enough for software tools, computer-related 
  2966. books and professional dues to wipe out any self-employment income 
  2967. arising from small-time shareware fees.  My expenditures in that area
  2968. are at least $2K per year (probably twice that last year).  You still
  2969. need to report the income and offsetting expenses, of course.  The
  2970. nice thing is that expenses come right out of self-employment income 
  2971. and you don't have to get over the standard deduction hump.  Just keep 
  2972. those receipts and don't deduct games (unless you're writing them).  :-)
  2973.  
  2974. So far I haven't bothered keeping track of capital expenditures, but
  2975. then again my self-employment income has been very small.
  2976.  
  2977. -- 
  2978. Joseph Nathan Hall | Joseph's Law of Interface Design: Never give your users
  2979. Software Architect | a choice between the easy way and the right way.
  2980. Gorca Systems Inc. |                 joseph@joebloe.maple-shade.nj.us (home)
  2981. (on assignment)    | (602) 732-2549 (work)  Joseph_Hall-SC052C@email.mot.com
  2982.  
  2983. +++++++++++++++++++++++++++
  2984.  
  2985. >From robertl@netcom.com (Robert L Mathews)
  2986. Date: Sat, 16 Apr 1994 08:55:41 GMT
  2987. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2988.  
  2989. Scott Gruby (Scott_Gruby@hmc.edu) wrote:
  2990. : Unfortunately I don't have a direct answer to this question and I don't
  2991. : plan on doing research until next year at tax time (I just started this
  2992. : year); but I do have some information on state sales tax in
  2993. : California...basically you don't have to collect it and people don't have
  2994. : to pay it. That's what the Board of Equalization told me yesterday.
  2995.  
  2996. : Something California shareware authors may want to note.
  2997.  
  2998. Whoa! This is only true if you don't mail the purchaser ANYTHING AT ALL
  2999. in return for the shareware payment. If you do paper mail them anything -
  3000. disk, manual, confirmation letter, anything - then it is taxable. This
  3001. is true even if the shareware user sends you a blank disk to put a copy
  3002. of the program on.
  3003.  
  3004. In front of me I have a copy of Regulation 1502: Sales Tax and Use
  3005. Regulations; Computers, Programs, and Data Processing.
  3006.  
  3007. "(c1) The transfer of title, for a consideration, of tangible personal
  3008. property, including property on which or into which information has
  3009. been recorded or incorporated, is a sale subject to tax."
  3010.  
  3011. Also, 
  3012. "(f1a) Tax applies whether title to the storage media on which the program
  3013. is recorded...passes to the customer, or the program is recorded...on
  3014. storage media furnished by the customer."
  3015.  
  3016. It goes on to say, though, that
  3017. "(f1d) The sale or lease of a prewritten program is NOT a taxable
  3018. transaction if the program is transferred by remote telecommunications
  3019. from the seller's place of business, to or through the purchaser's
  3020. computer and the purchaser does not obtain posession of ANY tangible
  3021. personal property, such as storage media, in the transaction." It also
  3022. mentions that the transfer of any written information, including
  3023. documentation of any form, would make the sale taxable.
  3024.  
  3025. So. If you're doing EVERYTHING by e-mail, or you don't send people
  3026. anything when they pay you, you don't have to pay sales tax. However,
  3027. if you send them a disk or manual, or a letter including a serial
  3028. number or a registration code (which counts as documentation, according
  3029. to the definitions), you gotta pay the tax.
  3030.  
  3031. Anyone can get a copy of this pamphlet by contacting the State Board of
  3032. "Equalization" at 450 N Street, Sacramento CA 95814. Ask for regulation
  3033. 1502. It gets very detailed, and it's all about computer businesses.
  3034.  
  3035. Mileage in other states may vary. However, you should check it out;
  3036. the penalties for not paying the tax are, as you would expect, nasty.
  3037.  
  3038. By the way, the best advice I have for filling out all those annoying
  3039. forms at the end of the year: marry a CPA. She (or he)'ll handle it.
  3040. --
  3041. Robert L Mathews
  3042.  
  3043. +++++++++++++++++++++++++++
  3044.  
  3045. >From jvp@tools1.ee.iastate.edu (Jim Van Peursem)
  3046. Date: 16 Apr 94 16:12:14 GMT
  3047. Organization: Iowa State University, Ames, Iowa
  3048.  
  3049. In <GDL.94Apr15015412@stlawrence.maths> gdl@stlawrence.maths (Greg Landweber) writes:
  3050.  
  3051. >In article <2ok1i7$hpa@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes:
  3052. >   Something to keep in mind is hardware purchases up to 17,500 can be
  3053. >   written off in the year of purchase using section 179 of form 4562. Software
  3054. >   does not fall into this areas and must be depreciated over 3 years.
  3055.  
  3056. >Really?  Where does it say this about software?  I deducted my
  3057. >software purchases using section 179.  I hope that wasn't a mistake.
  3058. >I seem to recall there being something in the tax instructions about
  3059. >expenses for developing software can be deducted as current expenses.
  3060. >And I read it all so carefully, too...
  3061.  
  3062.   I called the IRS on this point and they said software CAN be used
  3063. as a 179 deduction.
  3064.  
  3065. +---------------------------------------------------------------+
  3066. | Jim Van Peursem - Ph.D. Candidate      (Ham Radio -> KE0PH)   |
  3067. | Department of Electrical Engineering and Computer Engineering |
  3068. | Iowa State University - Ames, IA 50011 : (515) 294-8339       |
  3069. | internet - jvp@iastate.edu  -or-  jvp@cpre1.ee.iastate.edu    |
  3070. +---------------------------------------------------------------+
  3071.  
  3072. +++++++++++++++++++++++++++
  3073.  
  3074. >From tzs@u.washington.edu (Tim Smith)
  3075. Date: 18 Apr 1994 04:44:10 GMT
  3076. Organization: University of Washington School of Law, Class of '95
  3077.  
  3078. Owen M. Hartnett <omh@cs.brown.edu> wrote:
  3079. >The 3 out of 5 was never law, it was an IRS ruling that they would 
  3080. >consider a business to be non-hobby given that the business made a
  3081. >profit for 3 out of 5 years. You could always, then and now, made a
  3082. >point that the business was truly a business based on other factors.
  3083.  
  3084. I call your attention to paragraph (d) of section 183 of the Internal
  3085. Revenue Code, reproduced after my signature, infra.  The 3 out of 5
  3086. rule was indeed law (and still is, as far as I can tell, unless there
  3087. was a change I missed after Clinton's tax bill).
  3088.  
  3089. --Tim Smith
  3090.  
  3091. Sec. 183. Activities not engaged in for profit
  3092.  
  3093. (a) General rule
  3094.   In the case of an activity engaged in by an individual or an S
  3095. corporation, if such activity is not engaged in for profit, no
  3096. deduction attributable to such activity shall be allowed under this
  3097. chapter except as provided in this section.
  3098. (b) Deductions allowable
  3099.   In the case of an activity not engaged in for profit to which
  3100. subsection (a) applies, there shall be allowed -
  3101.     (1) the deductions which would be allowable under this chapter
  3102.   for the taxable year without regard to whether or not such
  3103.   activity is engaged in for profit, and
  3104.     (2) a deduction equal to the amount of the deductions which
  3105.   would be allowable under this chapter for the taxable year only
  3106.   if such activity were engaged in for profit, but only to the
  3107.   extent that the gross income derived from such activity for the
  3108.   taxable year exceeds the deductions allowable by reason of
  3109.   paragraph (1).
  3110. (c) Activity not engaged in for profit defined
  3111.   For purposes of this section, the term 'activity not engaged in
  3112. for profit' means any activity other than one with respect to which
  3113. deductions are allowable for the taxable year under section 162 or
  3114. under paragraph (1) or (2) of section 212.
  3115. (d) Presumption
  3116.   If the gross income derived from an activity for 3 or more of the
  3117. taxable years in the period of 5 consecutive taxable years which
  3118. ends with the taxable year exceeds the deductions attributable to
  3119. such activity (determined without regard to whether or not such
  3120. activity is engaged in for profit), then, unless the Secretary
  3121. establishes to the contrary, such activity shall be presumed for
  3122. purposes of this chapter for such taxable year to be an activity
  3123. engaged in for profit.  In the case of an activity which consists
  3124. in major part of the breeding, training, showing, or racing of
  3125. horses, the preceding sentence shall be applied by substituting '2'
  3126. for '3' and '7' for '5'.
  3127. (e) Special rule
  3128.   (1) In general
  3129.     A determination as to whether the presumption provided by
  3130.   subsection (d) applies with respect to any activity shall, if the
  3131.   taxpayer so elects, not be made before the close of the fourth
  3132.   taxable year (sixth taxable year, in the case of an activity
  3133.   described in the last sentence of such subsection) following the
  3134.   taxable year in which the taxpayer first engages in the
  3135.   activity.  For purposes of the preceding sentence, a taxpayer
  3136.   shall be treated as not having engaged in an activity during any
  3137.   taxable year beginning before January 1, 1970.
  3138.   (2) Initial period
  3139.     If the taxpayer makes an election under paragraph (1), the
  3140.   presumption provided by subsection (d) shall apply to each
  3141.   taxable year in the 5-taxable year (or 7-taxable year) period
  3142.   beginning with the taxable year in which the taxpayer first
  3143.   engages in the activity, if the gross income derived from the
  3144.   activity for 3 (or 2 if applicable) or more of the taxable years
  3145.   in such period exceeds the deductions attributable to the
  3146.   activity (determined without regard to whether or not the
  3147.   activity is engaged in for profit).
  3148.   (3) Election
  3149.     An election under paragraph (1) shall be made at such time and
  3150.   manner, and subject to such terms and conditions, as the
  3151.   Secretary may prescribe.
  3152.   (4) Time for assessing deficiency attributable to activity
  3153.     If a taxpayer makes an election under paragraph (1) with
  3154.   respect to an activity, the statutory period for the assessment
  3155.   of any deficiency attributable to such activity shall not expire
  3156.   before the expiration of 2 years after the date prescribed by law
  3157.   (determined without extensions) for filing the return of tax
  3158.   under chapter 1 for the last taxable year in the period of 5
  3159.   taxable years (or 7 taxable years) to which the election
  3160.   relates.  Such deficiency may be assessed notwithstanding the
  3161.   provisions of any law or rule of law which would otherwise
  3162.   prevent such an assessment.
  3163.  
  3164.  
  3165. +++++++++++++++++++++++++++
  3166.  
  3167. >From tzs@u.washington.edu (Tim Smith)
  3168. Date: 18 Apr 1994 04:59:02 GMT
  3169. Organization: University of Washington School of Law, Class of '95
  3170.  
  3171. Jim Van Peursem <jvp@tools1.ee.iastate.edu> wrote:
  3172. >  I called the IRS on this point and they said software CAN be used
  3173. >as a 179 deduction.
  3174.  
  3175. If I were going to try this, I think I'd call them two or three times
  3176. and make sure I got the same answer.  Section 179 says that it only
  3177. applies to tangible property, and at first blush I'd expect software
  3178. to be intangible property.  The regulations for section 179 do not
  3179. clarify things.
  3180.  
  3181. --Tim Smith
  3182.  
  3183. +++++++++++++++++++++++++++
  3184.  
  3185. >From resnick@cogsci.uiuc.edu (Pete Resnick)
  3186. Date: Mon, 18 Apr 1994 00:08:33 -0500
  3187. Organization: University of Illinois at Urbana-Champaign
  3188.  
  3189. In article <2ot42m$eng@news.u.washington.edu>, tzs@u.washington.edu (Tim
  3190. Smith) wrote:
  3191.  
  3192. >Jim Van Peursem <jvp@tools1.ee.iastate.edu> wrote:
  3193. >>  I called the IRS on this point and they said software CAN be used
  3194. >>as a 179 deduction.
  3195. >
  3196. >If I were going to try this, I think I'd call them two or three times
  3197. >and make sure I got the same answer.  Section 179 says that it only
  3198. >applies to tangible property, and at first blush I'd expect software
  3199. >to be intangible property.  The regulations for section 179 do not
  3200. >clarify things.
  3201.  
  3202. When I called in '92 to ask about THINK C (I just said "software tools"),
  3203. they not only said that I couldn't take a 179, but also that it should be
  3204. depreciated over 5 years (which according to some folks here is wrong and
  3205. should be 3). Lovely folks manning the phones at the IRS. :-)
  3206.  
  3207. pr
  3208. -- 
  3209. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  3210. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  3211. System manager - Cognitive Science Group, Beckman Institute, UIUC
  3212. Internet: resnick@cogsci.uiuc.edu
  3213.  
  3214. +++++++++++++++++++++++++++
  3215.  
  3216. >From wdh@netcom.com (Bill Hofmann)
  3217. Date: Mon, 18 Apr 1994 17:20:54 GMT
  3218. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  3219.  
  3220. tzs@u.washington.edu (Tim Smith) writes:
  3221.  
  3222. >Jim Van Peursem <jvp@tools1.ee.iastate.edu> wrote:
  3223. >>  I called the IRS on this point and they said software CAN be used
  3224. >>as a 179 deduction.
  3225.  
  3226. >If I were going to try this, I think I'd call them two or three times
  3227. >and make sure I got the same answer.  Section 179 says that it only
  3228. >applies to tangible property, and at first blush I'd expect software
  3229. >to be intangible property.  The regulations for section 179 do not
  3230. >clarify things.
  3231.  
  3232. Well, my accountant (who's an "Enrolled Agent," which means that she takes
  3233. lots of continuing education about tax law) who has lots of computer geeks
  3234. as customers, says that software is a 3 year item (which *is* a recent
  3235. change), and that it can be Section 179'd.  There is also a distinction
  3236. between software you *use* and software you use (eg) for testing--so your
  3237. THINK C or such must be depreciated or Sec 179'd, but the copy of Whammo
  3238. Write you bought to test your automatic spell checker system extension
  3239. against could actually be expensed.  Of course, unless you spend more than
  3240. 17,500 or so, you should probably just take it as section 179.
  3241. -- 
  3242. -Bill Hofmann                    wdh@netcom.COM
  3243.  Fresh Software and Instructional Design    +1 510 524 0852
  3244.  
  3245. +++++++++++++++++++++++++++
  3246.  
  3247. >From sbill@informix.com (Bill Stackhouse)
  3248. Date: 18 Apr 1994 17:19:48 GMT
  3249. Organization: Informix Software, Inc.
  3250.  
  3251. In article <jvp.766512734@tools1.ee.iastate.edu- jvp@tools1.ee.iastate.edu (Jim Van Peursem) writes:
  3252. -In <GDL.94Apr15015412@stlawrence.maths- gdl@stlawrence.maths (Greg Landweber) writes:
  3253. -
  3254. --In article <2ok1i7$hpa@infmx.informix.com- sbill@informix.com (Bill Stackhouse) writes:
  3255. --   Something to keep in mind is hardware purchases up to 17,500 can be
  3256. tten off in the year of purchase using section 179 of form 4562. Software
  3257. -
  3258. --Really?  Where does it say this about software?  I deducted my
  3259. --software purchases using section 179.  I hope that wasn't a mistake.
  3260. --I seem to recall there being something in the tax instructions about
  3261. --expenses for developing software can be deducted as current expenses.
  3262. --And I read it all so carefully, too...
  3263. -
  3264. -  I called the IRS on this point and they said software CAN be used
  3265. -as a 179 deduction.
  3266. -
  3267. -+---------------------------------------------------------------+
  3268.  
  3269.  
  3270. Read the booklet that the IRS has on depreciation and it is very clear
  3271. about software not allowed under section 179. I also asked in person 
  3272. at the IRS and at first they also said that it COULD be a 179 item. I
  3273. then showed them the paragraph in the booklet and they said that was
  3274. the first they knew about that. It was that way in both 1992 and 1993.
  3275. It is also explained in the booklet on small business expenses.
  3276.  
  3277.  
  3278.  
  3279. +++++++++++++++++++++++++++
  3280.  
  3281. >From gdl@stlawrence.maths (Greg Landweber)
  3282. Date: 18 Apr 1994 22:53:49 GMT
  3283. Organization: (none)
  3284.  
  3285. In article <wdhCoGtIv.H9G@netcom.com> wdh@netcom.com (Bill Hofmann) writes:
  3286.    Well, my accountant (who's an "Enrolled Agent," which means that she takes
  3287.    lots of continuing education about tax law) who has lots of computer geeks
  3288.    as customers, says that software is a 3 year item (which *is* a recent
  3289.    change), and that it can be Section 179'd.  There is also a distinction
  3290.    between software you *use* and software you use (eg) for testing--so your
  3291.    THINK C or such must be depreciated or Sec 179'd, but the copy of Whammo
  3292.    Write you bought to test your automatic spell checker system extension
  3293.    against could actually be expensed.  Of course, unless you spend more than
  3294.                              ^^^^^^^^
  3295.    17,500 or so, you should probably just take it as section 179.
  3296.  
  3297. What does it mean to "expense" something?  If I decide to "expense" my
  3298. copy of Whammo Write, where do I enter it on my tax forms?  I take it
  3299. that if I "expense" Whammo Write, then it is not depreciated, and so
  3300. it does not go on form 4562.  Do you put it on Schedule C under
  3301. Miscellaneous Expenses (writing out what it is), or does it fit into
  3302. one of the nice categories they provide for expenses?
  3303.  
  3304. BTW, for shareware authors with less than $2000 in expenses, you can
  3305. file Schedule C-EZ, where you simply enter your earnings, enter your
  3306. expenses, and subtract.  I'm not sure if you are allowed to do that if
  3307. your expenses include any property that should be depreciated.
  3308. However, with Schedule C-EZ, you don't have to provide a break-down of
  3309. your expenses, so the IRS would never know.  Also, you can feel safe,
  3310. realizing that had you filled out Schedule C, Form 4562, and taken the
  3311. Section 179 deduction, your taxes would have come out precisely the
  3312. same!
  3313.  
  3314. -- Greg
  3315.    gdl@maths.ox.ac.uk
  3316.  
  3317.  
  3318. +++++++++++++++++++++++++++
  3319.  
  3320. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3321. Date: Mon, 18 Apr 1994 01:51:31 GMT
  3322. Organization: Syracuse University, CIS Dept.
  3323.  
  3324. In article <1994Apr15.193811.14928@cs.brown.edu> omh@cs.brown.edu (Owen M. Hartnett) writes:
  3325. >>
  3326. >>The 3 out of 5 rule is no longer law.  Under current law, you need only
  3327. >>treat the activity as a genuine business (intended to turn a profit).
  3328. >>Don't ask me how you would prove this if you consistently show a loss
  3329. >>(or more to the point, how the IRS would prove the activity was not a
  3330. >>business).
  3331. >>
  3332. >The 3 out of 5 was never law, it was an IRS ruling that they would 
  3333. >consider a business to be non-hobby given that the business made a
  3334. >profit for 3 out of 5 years. You could always, then and now, made a
  3335. >point that the business was truly a business based on other factors.
  3336.  
  3337. You're right--I misspoke, and I realized it when I saw my post but
  3338. didn't figure it was worth cancelling the post.  But the former 3 out
  3339. of 5 rule is definitely no longer an IRS rule...
  3340.  
  3341.  
  3342. [...]
  3343.  
  3344. >>>There are definite advantages to filing a schedule C and you may want to
  3345. >>>consider them. Also consider the fact that, while you must report all
  3346. >>>your income, you plan your own purchases, so you do
  3347. >>>control whether or not your venture is profitable for a given year.
  3348. >>
  3349. >>Maybe, maybe not.  Unexpected expenses can always change things.
  3350. >
  3351. >Even so, the timing of those expenses is under your control.
  3352.  
  3353. How so?  I incurred substantial legal expenses last year related to a
  3354. trademark dispute.  I don't see where I had any choice but to deduct those
  3355. expenses on my return for last year.
  3356.  
  3357. (Not that I wanted to do otherwise.  My point is, simply, that expenses like
  3358. non-startup-related legal fees are not capital expenditures.  I wouldn't think
  3359. that they could be depreciated.)
  3360.  
  3361.  
  3362. -- 
  3363. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3364. (I like to put 'greeny' here, 
  3365. but my d*mn system wants a 
  3366. *real* name!)                        "What's the difference between an orange?"
  3367.  
  3368. +++++++++++++++++++++++++++
  3369.  
  3370. >From isbell@ai.mit.edu (Charles L Isbell)
  3371. Date: 19 Apr 94 08:52:22
  3372. Organization: MIT Artificial Intelligence Laboratory
  3373.  
  3374. resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  3375. |>>  I called the IRS on this point and they said software CAN be used
  3376. |>>as a 179 deduction.
  3377. |>
  3378. |>If I were going to try this, I think I'd call them two or three times
  3379. |>and make sure I got the same answer.  Section 179 says that it only
  3380. |>applies to tangible property, and at first blush I'd expect software
  3381. |>to be intangible property.  The regulations for section 179 do not
  3382. |>clarify things.
  3383.  
  3384. |When I called in '92 to ask about THINK C (I just said "software tools"),
  3385. |they not only said that I couldn't take a 179, but also that it should be
  3386. |depreciated over 5 years (which according to some folks here is wrong and
  3387. |should be 3). Lovely folks manning the phones at the IRS. :-)
  3388.  
  3389. It is a known feature of the IRS that each time you call them to ask
  3390. about a particular question, you will get a different answer.  Given
  3391. that and an early enough start, it is reasonable to keep calling until
  3392. you get the answer you want to hear.  At that time, record the time
  3393. and date of the call and write down the name of the person giving you
  3394. the answer.  This might help at audit time, should it ever come up.
  3395.  
  3396. :)
  3397. --
  3398. Peace.
  3399.                            "If I could find a way to get [Saddam Hussein] out
  3400.                             of there, even putting a contract out on him, if
  3401.                             the CIA still did that sort of a thing, assuming
  3402.                             it ever did, I would be for it."
  3403.                                            -- Richard Nixon
  3404.                                 -\--/-
  3405.  Don't just adopt opinions     |  \/  |       Some of you are homeboys
  3406.        develop them.           |  /\  | but only I am The Homeboy From hell
  3407.                                 -/--\-
  3408.  
  3409.  
  3410. +++++++++++++++++++++++++++
  3411.  
  3412. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3413. Date: Mon, 18 Apr 1994 14:26:51 GMT
  3414. Organization: Syracuse University, CIS Dept.
  3415.  
  3416. In article <2ot42m$eng@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes:
  3417.  
  3418. >>  I called the IRS on this point and they said software CAN be used
  3419. >>as a 179 deduction.
  3420. >
  3421. >If I were going to try this, I think I'd call them two or three times
  3422. >and make sure I got the same answer.  Section 179 says that it only
  3423. >applies to tangible property, and at first blush I'd expect software
  3424. >to be intangible property.  The regulations for section 179 do not
  3425. >clarify things.
  3426.  
  3427. How do you figure that it's intangible?  You must think that shrinkwrap
  3428. licenses--which specify that you purchase only a license to use the
  3429. software--are valid contracts.
  3430.  
  3431. I'd maintain that what you purchase (in almost all cases) is a *copy*
  3432. of the software (along with manuals, etc.).  That copy of the software
  3433. is most certainly tangible.
  3434.  
  3435.  
  3436. -- 
  3437. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3438. (I like to put 'greeny' here, 
  3439. but my d*mn system wants a 
  3440. *real* name!)                        "What's the difference between an orange?"
  3441.  
  3442. +++++++++++++++++++++++++++
  3443.  
  3444. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3445. Date: Mon, 18 Apr 1994 14:36:28 GMT
  3446. Organization: Syracuse University, CIS Dept.
  3447.  
  3448. In article <2ot36q$ejb@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes:
  3449.  
  3450. >>The 3 out of 5 was never law, it was an IRS ruling that they would 
  3451. >>consider a business to be non-hobby given that the business made a
  3452. >>profit for 3 out of 5 years. You could always, then and now, made a
  3453. >>point that the business was truly a business based on other factors.
  3454. >
  3455. >I call your attention to paragraph (d) of section 183 of the Internal
  3456. >Revenue Code, reproduced after my signature, infra.  The 3 out of 5
  3457. >rule was indeed law (and still is, as far as I can tell, unless there
  3458. >was a change I missed after Clinton's tax bill).
  3459. >
  3460. >
  3461. >Sec. 183. Activities not engaged in for profit
  3462. >
  3463. >[text omitted]
  3464.  
  3465. I just scanned the text quickly, but it appeared to me that all it said
  3466. was that making a profit in 3 out of 5 years creates a presumption that
  3467. the activity is for profit.  In other words, it is a *sufficient*
  3468. condition to be considered a business rather than a hobby.
  3469.  
  3470. This is quite different from requiring 3 out of 5 years of profit as a
  3471. *necessary* condition to be considered a business.
  3472.  
  3473. The latter seems to have been an IRS rule, which I'm quite sure is no
  3474. longer in effect.  I believe the rule was overturned as the result of
  3475. litigation.
  3476.  
  3477.  
  3478. -- 
  3479. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3480. (I like to put 'greeny' here, 
  3481. but my d*mn system wants a 
  3482. *real* name!)                        "What's the difference between an orange?"
  3483.  
  3484. +++++++++++++++++++++++++++
  3485.  
  3486. >From omh@cs.brown.edu (Owen M. Hartnett)
  3487. Date: Tue, 19 Apr 1994 23:14:29 GMT
  3488. Organization: Brown University Department of Computer Science
  3489.  
  3490. In article <1994Apr18.143628.14657@newstand.syr.edu> greeny@top.cis.syr.edu (J. S. Greenfield) writes:
  3491. >In article <2ot36q$ejb@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes:
  3492. >
  3493. >>>The 3 out of 5 was never law, it was an IRS ruling that they would 
  3494. >>>consider a business to be non-hobby given that the business made a
  3495. >>>profit for 3 out of 5 years. You could always, then and now, made a
  3496. >>>point that the business was truly a business based on other factors.
  3497. >>
  3498. >>I call your attention to paragraph (d) of section 183 of the Internal
  3499. >>Revenue Code, reproduced after my signature, infra.  The 3 out of 5
  3500. >>rule was indeed law (and still is, as far as I can tell, unless there
  3501. >>was a change I missed after Clinton's tax bill).
  3502. >>
  3503. >>
  3504. >>Sec. 183. Activities not engaged in for profit
  3505. >>
  3506. >>[text omitted]
  3507. >
  3508. >I just scanned the text quickly, but it appeared to me that all it said
  3509. >was that making a profit in 3 out of 5 years creates a presumption that
  3510. >the activity is for profit.  In other words, it is a *sufficient*
  3511. >condition to be considered a business rather than a hobby.
  3512. >
  3513. >This is quite different from requiring 3 out of 5 years of profit as a
  3514. >*necessary* condition to be considered a business.
  3515. >
  3516. You are quite correct. I remember reading a CCH Tax article which said
  3517. just the above. You could still get a business deduction if you met
  3518. other "reasonable man" types of conditions, even when 3 out of 5 was in
  3519. effect. There were several court cases which validated this.
  3520.  
  3521. >The latter seems to have been an IRS rule, which I'm quite sure is no
  3522. >longer in effect.  I believe the rule was overturned as the result of
  3523. >litigation.
  3524.  
  3525. I don't think it was for a particular litigation, rather the court cases
  3526. which have been taking place. I think that the IRS instruction was to
  3527. allow its agents more broader authority in determining business vs. hobby.
  3528. Particularly when you consider businesses that go broke before 5 years,
  3529. which often happens, this ruling needed to be broader. 
  3530.  
  3531. -Owen
  3532.  
  3533.  
  3534. -- 
  3535. Owen Hartnett                omh@cs.brown.edu
  3536. "FAITH, n. Belief without evidence in what is told by one who speaks
  3537.         without knowledge, of things without parallel."
  3538.             -Ambrose Bierce - The Devil's Dictionary
  3539.  
  3540. +++++++++++++++++++++++++++
  3541.  
  3542. >From oster@netcom.com (David Phillip Oster)
  3543. Date: Wed, 20 Apr 1994 06:38:47 GMT
  3544. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  3545.  
  3546.  
  3547. Has anyone succeeded in claiming the (Federal) Research and
  3548. Development Investment Tax Credit? I have not been able to
  3549. find a definition of this that I can 
  3550.  
  3551. +++++++++++++++++++++++++++
  3552.  
  3553. >From sbill@informix.com (Bill Stackhouse)
  3554. Date: 20 Apr 1994 20:56:37 GMT
  3555. Organization: Informix Software, Inc.
  3556.  
  3557. In article <1994Apr18.142651.14458@newstand.syr.edu- greeny@top.cis.syr.edu (J. S. Greenfield) writes:
  3558. -In article <2ot42m$eng@news.u.washington.edu- tzs@u.washington.edu (Tim Smith) writes:
  3559. -
  3560. - -  I called the IRS on this point and they said software CAN be used
  3561. - -as a 179 deduction.
  3562. --
  3563. --If I were going to try this, I think I'd call them two or three times
  3564. --and make sure I got the same answer.  Section 179 says that it only
  3565. --applies to tangible property, and at first blush I'd expect software
  3566. --to be intangible property.  The regulations for section 179 do not
  3567. --clarify things.
  3568. -
  3569. -How do you figure that it's intangible?  You must think that shrinkwrap
  3570. -licenses--which specify that you purchase only a license to use the
  3571. -software--are valid contracts.
  3572. -
  3573. -I'd maintain that what you purchase (in almost all cases) is a *copy*
  3574. -of the software (along with manuals, etc.).  That copy of the software
  3575. -is most certainly tangible.
  3576. -
  3577.  
  3578. Sorry but the IRS booklet on depreciation specifically says that software
  3579. is intangible and cannot not be included with section 179 expenses.
  3580.  
  3581.  
  3582.  
  3583. +++++++++++++++++++++++++++
  3584.  
  3585. >From peirce@outpost.SF-Bay.org (Michael Peirce)
  3586. Date: 20 Apr 94 23:47:27 GMT
  3587. Organization: Peirce Software, Inc.
  3588.  
  3589.  
  3590. In article <Scott_Gruby-130494192212@eagle.st.hmc.edu> (comp.sys.mac.programmer), Scott_Gruby@hmc.edu (Scott Gruby) writes:
  3591. > In article <2oho76$7mq@cville-srv.wam.umd.edu>, kidwell@wam.umd.edu
  3592. > (Christopher Bruce Kidwell) wrote:
  3593. > > As tax time for us US folks rolls around, I was curious about what to do
  3594. > > about shareware payments received. Do small-time shareware authors out
  3595. > > there report their income? What about foreign income?
  3596. > > 
  3597. > > Chris Kidwell
  3598. > > kidwell@wam.umd.edu
  3599. > Unfortunately I don't have a direct answer to this question and I don't
  3600. > plan on doing research until next year at tax time (I just started this
  3601. > year); but I do have some information on state sales tax in
  3602. > California...basically you don't have to collect it and people don't have
  3603. > to pay it. That's what the Board of Equalization told me yesterday.
  3604. > Something California shareware authors may want to note.
  3605.  
  3606. Humm, I was told the exact opposite.  I've been filing annual sales
  3607. tax reports for the last couple of years for my shareware sales to
  3608. to California folks (I live in CA).
  3609.  
  3610. It possible that things have changed, but I already have to file a
  3611. sales tax report for other products and people seem to expect to pay
  3612. the sales tax...
  3613.  
  3614.  
  3615. __ Michael Peirce        __ peirce@outpost.sf-bay.org
  3616. __ Peirce Software, Inc. __ 719 Hibiscus Place, Suite 301
  3617. __                       __ San Jose, California USA 95117-1844
  3618. __ Makers of: Smoothie & __ voice: +1.408.244.6554 fax: +1.408.244.6882
  3619. __    Peirce Print Tools __ AppleLink: peirce & AOL: AFC Peirce
  3620.  
  3621. +++++++++++++++++++++++++++
  3622.  
  3623. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3624. Date: Thu, 21 Apr 1994 13:32:36 GMT
  3625. Organization: Syracuse University, CIS Dept.
  3626.  
  3627. In article <2p44u5$6ik@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes:
  3628.  
  3629. >--If I were going to try this, I think I'd call them two or three times
  3630. >--and make sure I got the same answer.  Section 179 says that it only
  3631. >--applies to tangible property, and at first blush I'd expect software
  3632. >--to be intangible property.  The regulations for section 179 do not
  3633. >--clarify things.
  3634. >-
  3635. >-How do you figure that it's intangible?  You must think that shrinkwrap
  3636. >-licenses--which specify that you purchase only a license to use the
  3637. >-software--are valid contracts.
  3638. >-
  3639. >-I'd maintain that what you purchase (in almost all cases) is a *copy*
  3640. >-of the software (along with manuals, etc.).  That copy of the software
  3641. >-is most certainly tangible.
  3642. >
  3643. >Sorry but the IRS booklet on depreciation specifically says that software
  3644. >is intangible and cannot not be included with section 179 expenses.
  3645.  
  3646. In that case, I'd have to conclude that the IRS does not understand the
  3647. meaning of the word "intangible."
  3648.  
  3649.  
  3650. -- 
  3651. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3652. (I like to put 'greeny' here, 
  3653. but my d*mn system wants a 
  3654. *real* name!)                        "What's the difference between an orange?"
  3655.  
  3656. +++++++++++++++++++++++++++
  3657.  
  3658. >From rba26@cas.org (Brad Andrews)
  3659. Date: Fri, 22 Apr 1994 19:33:09 GMT
  3660. Organization: Chemical Abstracts Service
  3661.  
  3662. In article 6ik@infmx.informix.com, sbill@informix.com (Bill Stackhouse) writes:
  3663. ]
  3664. ]Sorry but the IRS booklet on depreciation specifically says that software
  3665. ]is intangible and cannot not be included with section 179 expenses.
  3666. ]
  3667. ]
  3668.  
  3669.  
  3670. But what kind of "software" is it referring to?  I would guess they might have
  3671. been thinking of the kind you buy for a mainframe.  I could be wrong though.
  3672.  
  3673. - -
  3674.  
  3675. Brad Andrews
  3676. Brad.Andrews@cas.org
  3677. All opinions are strictly mine
  3678.  
  3679.  
  3680. +++++++++++++++++++++++++++
  3681.  
  3682. >From jfw@ksr.com (John F. Woods)
  3683. Date: 18 Apr 1994 19:38:09 GMT
  3684. Organization: Kendall Square Research
  3685.  
  3686. tzs@u.washington.edu (Tim Smith) writes:
  3687. >Jim Van Peursem <jvp@tools1.ee.iastate.edu> wrote:
  3688. >>  I called the IRS on this point and they said software CAN be used
  3689. >>as a 179 deduction.
  3690. >If I were going to try this, I think I'd call them two or three times
  3691. >and make sure I got the same answer.  Section 179 says that it only
  3692. >applies to tangible property, and at first blush I'd expect software
  3693. >to be intangible property.  The regulations for section 179 do not
  3694. >clarify things.
  3695.  
  3696. Gee, the DO NOT REMOVE THIS SOFTWARE LICENSE UNDER PENALTY OF DEATH licenses
  3697. make it pretty clear that you have purchased, at most, some small squares
  3698. of plastic and iron oxide and a badly written manual which isn't guaranteed
  3699. to have anything to do with any program that might, through sheer negligence,
  3700. have accidently been recorded on the piece of plastic.  That sounds pretty
  3701. tangible to me; maybe software licenses have a use after all ;-).
  3702.  
  3703.  
  3704. [WARNING:  THE ABOVE IS INTENDED AS HUMOR.  I FORMALLY GUARANTEE, WITH THE
  3705. SAME FIRMNESS OF COMMITMENT AT COMMERCIAL SOFTWARE PUBLISHERS, THAT THE IRS
  3706. DO *NOT* CONCUR WITH THAT REASONING (I.E. IF IT TURNS OUT THAT THEY DO, 
  3707. RETURN THIS ARTICLE TO WHERE YOU PURCHASED IT WITHIN THE NEXT 90 MILLISECONDS
  3708. FOR A FULL REFUND OF YOUR PURCHASE PRICE :-) ) ]
  3709.  
  3710. +++++++++++++++++++++++++++
  3711.  
  3712. >From greeny@top.cis.syr.edu (J. S. Greenfield)
  3713. Date: Sun, 24 Apr 1994 03:31:55 GMT
  3714. Organization: Syracuse University, CIS Dept.
  3715.  
  3716. In article <2ounj1$njg@hopscotch.ksr.com> jfw@ksr.com (John F. Woods) writes:
  3717.  
  3718. >>>I called the IRS on this point and they said software CAN be used
  3719. >>>as a 179 deduction.
  3720. >>
  3721. >>If I were going to try this, I think I'd call them two or three times
  3722. >>and make sure I got the same answer.  Section 179 says that it only
  3723. >>applies to tangible property, and at first blush I'd expect software
  3724. >>to be intangible property.  The regulations for section 179 do not
  3725. >>clarify things.
  3726. >
  3727. >Gee, the DO NOT REMOVE THIS SOFTWARE LICENSE UNDER PENALTY OF DEATH licenses
  3728. >make it pretty clear that you have purchased, at most, some small squares
  3729. >of plastic and iron oxide and a badly written manual which isn't guaranteed
  3730. >to have anything to do with any program that might, through sheer negligence,
  3731. >have accidently been recorded on the piece of plastic.  That sounds pretty
  3732. >tangible to me; maybe software licenses have a use after all ;-).
  3733. >
  3734. >
  3735. >[WARNING:  THE ABOVE IS INTENDED AS HUMOR....
  3736.  
  3737. Actually, I'd say you have it backwards.  Most shrinkwrap licenses suggest
  3738. that you have not bought a *copy* of the software, but rather, you have
  3739. only purchased a license to use the software.  The shrinkwrap license
  3740. maintains that the copy you are given remains the property of the
  3741. publisher.
  3742.  
  3743. Since shrinkwrap licenses are almost universally considered to be
  3744. unenforceable, as a matter of law, you actually do purchase a *copy* of
  3745. the software.
  3746.  
  3747. Now, a license is intangible, but an actual copy of the software is
  3748. tangible.  That the IRS apparently defines software as intangible (regardless
  3749. of the actual circumstances of its purchase) suggests that they don't give
  3750. a damn whether their rules have anything to do with law or reality.
  3751.  
  3752. (That is, their definition of "tangible" has nothing to do with either the
  3753. legal or common definition of that word.)
  3754.  
  3755.  
  3756. -- 
  3757. J. S. Greenfield                                         greeny@top.cis.syr.edu
  3758. (I like to put 'greeny' here, 
  3759. but my d*mn system wants a 
  3760. *real* name!)                        "What's the difference between an orange?"
  3761.  
  3762. +++++++++++++++++++++++++++
  3763.  
  3764. >From Rick_Holzgrafe@taligent.com (Rick Holzgrafe)
  3765. Date: Mon, 25 Apr 1994 18:55:52 GMT
  3766. Organization: Semicolon Software
  3767.  
  3768. In article <CNjbKKKX.tlvoe1@outpost.SF-Bay.org>, peirce@outpost.SF-Bay.org
  3769. (Michael Peirce) wrote:
  3770.  
  3771. > In article <Scott_Gruby-130494192212@eagle.st.hmc.edu> (comp.sys.mac.programmer), Scott_Gruby@hmc.edu (Scott Gruby) writes:
  3772. > > 
  3773. > > [...] but I do have some information on state sales tax in
  3774. > > California...basically you don't have to collect it and people don't have
  3775. > > to pay it. That's what the Board of Equalization told me yesterday.
  3776. > > 
  3777. > > Something California shareware authors may want to note.
  3778. > Humm, I was told the exact opposite.  I've been filing annual sales
  3779. > tax reports for the last couple of years for my shareware sales to
  3780. > to California folks (I live in CA).
  3781.  
  3782. My discussions with the CA State Board of Equalization and my reading of
  3783. their rules and regs (sorry, can't quote a source just now) indicate that
  3784. you must pay sales tax if and only if your customers receive some sort of
  3785. material goods from you as part of the exchange. If the goods are delivered
  3786. entirely by electronic means (e.g., the customer downloaded the product
  3787. from a BBS and you send no disks or manual in exchange for their payment),
  3788. then sales tax is not involved.
  3789.  
  3790. Accordingly I report sales tax on my mail-order product (for which the
  3791. customer receives a labeled disk and printed manual) but not for my
  3792. shareware products which are complete and self-contained when the customer
  3793. downloads them.
  3794.  
  3795. A nit: the customer is not required to pay sales tax in any case. The
  3796. SELLER is required to pay the tax, which may be collected from the customer
  3797. (i.e., added to the product's base price) or simply paid out of the
  3798. seller's gross.
  3799.  
  3800. -- Rick Holzgrafe
  3801.    Semicolon Software
  3802.    rmh@taligent.com
  3803.  
  3804. +++++++++++++++++++++++++++
  3805.  
  3806. >From tzs@u.washington.edu (Tim Smith)
  3807. Date: 7 May 1994 11:56:37 GMT
  3808. Organization: University of Washington School of Law, Class of '95
  3809.  
  3810. >How do you figure that it's intangible?  You must think that shrinkwrap
  3811. >licenses--which specify that you purchase only a license to use the
  3812. >software--are valid contracts.
  3813.  
  3814. Non sequitur.  Why would my guess that software is intangible for tax
  3815. purposes have anything to do with what I think of shrinkwrap licenses?
  3816.  
  3817. --Tim Smith
  3818.  
  3819. +++++++++++++++++++++++++++
  3820.  
  3821. >From rmah@panix.com (Robert S. Mah)
  3822. Date: Sat, 07 May 1994 15:11:13 -0500
  3823. Organization: One Step Beyond
  3824.  
  3825. tzs@u.washington.edu (Tim Smith) wrote:
  3826.  
  3827. > >How do you figure that it's intangible?  You must think that shrinkwrap
  3828. > >licenses--which specify that you purchase only a license to use the
  3829. > >software--are valid contracts.
  3830. > Non sequitur.  Why would my guess that software is intangible for tax
  3831. > purposes have anything to do with what I think of shrinkwrap licenses?
  3832.  
  3833. Software is copyrightable.  Only tanglible things can be copyrighted.
  3834. Copyrighted items, when sold (or licensed or whatever) are usually taxed.
  3835. In some places even services (i.e. non tangibles) have a sales tax 
  3836. associated with them.
  3837.  
  3838. In other words, whether you have to pay sales taxes is not a philosophical
  3839. question or a question of logical deduction.  Simply follow the appropriate
  3840. laws.  No one ever said laws have to make sence.  If you disagree you can
  3841. challenge the law in court.  But until you win, you must still pay your 
  3842. taxes if that's what the law says.
  3843.  
  3844. Cheers,
  3845. Rob
  3846. ___________________________________________________________________________
  3847. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  3848.  
  3849. ---------------------------
  3850.  
  3851. >From taihou@iss.nus.sg (Tng Tai Hou)
  3852. Subject: Thread Mgr Native PPC NOT - why?
  3853. Date: 8 May 1994 08:43:27 +0800
  3854. Organization: Institute Of Systems Science, NUS
  3855.  
  3856. In the readme of the new native Thread Mgr 2.01, it was emphasized that
  3857. there are no pre-emptive threads for the PPC - never has and never
  3858. will  !!!    This from a official free Apple product!!!
  3859.  
  3860. No reasons were given. But I think everyone would like to know
  3861. why this is so. Is there something about the PPC that makes
  3862. it unable to perform pre-emptive threads?!!! Is it the software
  3863. or hardware? If it is true for all (now and future) PowerMacs,
  3864. then we can end the debate about pre-emptive threads once
  3865. and for all - there won't be any.
  3866.  
  3867. Please, can someone, esp someone from Apple clarify this in technical
  3868. details.
  3869.  
  3870. I can only venture a guess - that the PPC in hardware has only one
  3871. level of interrupt, and that makes in very tough. That the System Software
  3872. in 68k has a lot more interrupts, and this has be emulated, which it is.
  3873.  
  3874. Please, this isn't a flame or a criticism. I need to know.
  3875.  
  3876. Tai Hou TNG
  3877. Singapore
  3878.  
  3879.  
  3880. +++++++++++++++++++++++++++
  3881.  
  3882. >From chewy@shell.portal.com (Paul F. Snively)
  3883. Date: 8 May 1994 14:12:10 GMT
  3884. Organization: tumbolia.com
  3885.  
  3886. In article <2qhcjf$1gd@ghost.iss.nus.sg>
  3887. taihou@iss.nus.sg (Tng Tai Hou) writes:
  3888.  
  3889. > In the readme of the new native Thread Mgr 2.01, it was emphasized that
  3890. > there are no pre-emptive threads for the PPC - never has and never
  3891. > will  !!!    This from a official free Apple product!!!
  3892. > No reasons were given. But I think everyone would like to know
  3893. > why this is so.
  3894.  
  3895. There was a fairly sizable thread about this earlier.  The problem
  3896. stems from the fact that the 68K emulator uses a pretty simple runtime
  3897. model for the interrupts that the Thread Manager uses to schedule
  3898. preemptive threads.  That is, if an interrupt occurred in the middle of
  3899. emulating a 68K instruction, and a thread context-switch occurred, the
  3900. emulator isn't written in such a way as to handle that gracefully, and
  3901. to rewrite the emulator to allow thread context switching in the middle
  3902. of emulating a 68K instruction would introduce significant overhead
  3903. into the emulator, so they're not prepared to do it.
  3904.  
  3905. Apple's conventional wisdom on the subject is that they're working on a
  3906. preemptively-multitasked future version of the OS, so "wait for it." 
  3907. This, of course, conveniently ignores the installed base plus the
  3908. amount of time between when Apple releases a new system and the time
  3909. that a statistically significant portion of Apple's 13% of the market
  3910. trusts it.
  3911.  
  3912. Does it sound like I feel pretty cynical about Apple these days?  It
  3913. should.
  3914.  
  3915. - ---------------------------------------------------------------------
  3916. Paul F. Snively          "Just because you're paranoid, it doesn't mean
  3917. chewy@shell.portal.com    that there's no one out to get you."
  3918.  
  3919. ---------------------------
  3920.  
  3921. >From knop@duteca8.et.tudelft.nl (Peter Knoppers)
  3922. Subject: updated list of bizarre key combos on the mac
  3923. Date: 2 May 1994 21:52:34 GMT
  3924. Organization: Delft University of Technology, Dept. of Electrical Engineering
  3925.  
  3926. It has been quite a while since I last updated the list below. It is
  3927. about double the size of the previous version. Recently I got a few
  3928. requests for the "current" version, so I decided to create a "current"
  3929. version.
  3930.  
  3931. Enjoy!
  3932.  
  3933. List of bizarre, useful keyboard combinations, version 1.2, May 2, 1994.
  3934. - ---------------------------------------------------------------------------
  3935. Effect:        Rebuild the desktop file.
  3936. How to obtain:    Hold COMMAND+OPTION during startup.
  3937. Restrictions:    None.
  3938. Why use this:    When your icons are suddenly lost, to reduce the size of the
  3939.         desktop file (and probably in some other cases).
  3940. Learned from:    Comp.sys.mac.faq, July 22, 1992.
  3941. - ---------------------------------------------------------------------------
  3942. Effect:        Don't mount the internal SCSI disk (ID=0) on startup.
  3943. How to obtain:    Hold OPTION+COMMAND+SHIFT+BACKSPACE during startup.
  3944. Restrictions:    Only on ADB keyboard.
  3945. Why use this:    To by-pass (not boot from) a corrupt internal hard disk.
  3946. Learned from:    Posting by Daniel Mueller <muller_d@elgc.epfl.ch>.
  3947. - ---------------------------------------------------------------------------
  3948. Effect:        Startup with a minimal ROM-disk containing System 6.0.3,
  3949.         Finder 6.1x and AppleShare.
  3950. How to obtain:    Hold COMMAND+OPTION+X+O during startup.
  3951. Restrictions:    Only on the Mac Classic; this version of the System is NOT
  3952.         recommended to run the Classic under.
  3953. Why use this;    Probably for emergency repairs.
  3954. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  3955. - ---------------------------------------------------------------------------
  3956. Effect:        Zap the PRAM (Parameter RAM).
  3957. How to obtain:    Hold COMMAND+OPTION+P+R during startup.
  3958. Restrictions:    Only on System 7 and your timing seems to be critical...
  3959. Why use this:    This sometimes cures weird problems.
  3960. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  3961. - ---------------------------------------------------------------------------
  3962. Effect:        Don't load extensions and don't execute startup items.
  3963. How to obtain:    Hold SHIFT during startup.
  3964. Restrictions:    System 7.
  3965. Why use this:    To start a Macintosh with a conflicting collection of
  3966.         extensions and startup items.
  3967. Learned from:    Rene G.A. Ros rgaros@bio.vu.nl>,
  3968.         or <rgaros@nikhefk.nikhef.nl>
  3969. - ---------------------------------------------------------------------------
  3970. Effect:        Don't execute startup items.
  3971. How to obtain:    Press and hold SHIFT after the last extension has loaded, but
  3972.         before the finder is completely started.
  3973. Restrictions:    System 7.
  3974. Why use this:    To start a Macintosh that has a conflicting collection of
  3975.         startup items.
  3976. Learned from:    Rene G.A. Ros rgaros@bio.vu.nl>,
  3977.         or <rgaros@nikhefk.nikhef.nl>
  3978. - ---------------------------------------------------------------------------
  3979. Effect:        Eject floppy disk before looking for a boot disk.
  3980. How to obtain:    Hold MOUSEBUTTON during startup.
  3981. Restrictions:    None.
  3982. Why use this:    If you have a boot disk in the floppy drive, but don't want
  3983.         to boot from it.
  3984. Learned from:    Michael Grabenstein <grabenst@umbc3.umbc.edu>
  3985.         or <ZMEG@AACC.bitnet>.
  3986. - ---------------------------------------------------------------------------
  3987. Effect:        Kill the current foreground process.
  3988. How to obtain:    Type COMMAND+OPTION+ESCAPE.
  3989. Restrictions:    Only on System 7.
  3990. Why use this:    After an application has crashed this might regain you
  3991.         control of the machine in order to save work done in other
  3992.         applications before restarting. Restart as soon as possible
  3993.         afterwards because some things may have been clobbered by
  3994.         the crashed application.
  3995. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  3996. - ---------------------------------------------------------------------------
  3997. Effect:        Rebuild the desktop.
  3998. How to obtain:    Type COMMAND+OPTION+ESCAPE while in the Finder, then (at the
  3999.         dialog "Force Finder to quit?") select Force Quit and then
  4000.         immediately hold OPTION+COMMAND.
  4001. Restrictions:    Only on System 7.
  4002. Why use this:    When your icons are suddenly lost, to reduce the size of the
  4003.         desktop file (and probably in some other cases).
  4004. Learned from:    Mark Noda <nodam@amaterasu.sbi.com>.
  4005. - ---------------------------------------------------------------------------
  4006. Effect:        Reset.
  4007. How to obtain:    Type COMMAND+CONTROL+POWER
  4008.         (power is the key with the triangle on it).
  4009. Restrictions:    Macintosh LC or Macintosh IIsi (which don't have a restart
  4010.         button).
  4011. Why use this:    To restart a hung system.
  4012. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  4013. - ---------------------------------------------------------------------------
  4014. Effect:        Restart the Mac.
  4015. How To Obtain:    Type COMMAND-SHIFT-POWER.
  4016.         (power is the key with the triangle on it).
  4017. restrictions:    Must have programmer's key installed.
  4018. Why use this:    To restart a hung system.
  4019. Learned from:    Joshua Rabinowitz <joshr@ptolemy.arc.nasa.gov>.
  4020. - ---------------------------------------------------------------------------
  4021. Effect:        Interrupt; enter the debugger.
  4022. How to obtain:    Type COMMAND+POWER.
  4023.         (power is the key with the triangle on it).
  4024. Restrictions:    Macintosh LC or Macintosh IIsi (which don't have an interrupt
  4025.         button).
  4026. Why use this:    To enter the debugger (if installed, else to crash the
  4027.         computer).
  4028. Learned from:    The Macintosh secret trick list, 16 April, 1992.
  4029. - ---------------------------------------------------------------------------
  4030. Effect:        Eject the floppy disk in the internal drive immediately.
  4031. How to obtain:    Hold COMMAND+SHIFT+1.
  4032. Restrictions:    None (known).
  4033. Why use this:    To save yourself one bent paper clip. This works even while
  4034.         _in_ the format dialog, thus enabling you to replace the
  4035.         floppy in the drive by one with an unrepairable desktop file.
  4036. Learned from:    Owen S. Nishioka <owen@olympus.arc.nasa.gov>
  4037. - ---------------------------------------------------------------------------
  4038. Effect:        Eject the floppy disk in the external (or second internal)
  4039.         drive immediately.
  4040. How to obtain:    Hold COMMAND+SHIFT+2.
  4041. Restrictions:    None (known).
  4042. Why use this:    To save yourself one bent paper clip. This works even while
  4043.         _in_ the format dialog, thus enabling you to replace the
  4044.         floppy in the drive by one with an unrepairable desktop file.
  4045. Learned from:    Owen S. Nishioka <owen@olympus.arc.nasa.gov>
  4046. - ---------------------------------------------------------------------------
  4047. Effect:        Create a screen dump in MacPaint format.
  4048. How to obtain:    Type COMMAND+SHIFT+3.
  4049. Restrictions:    None.
  4050. Why use this:    To create documentation of a Macintosh product. The screen
  4051.         dump files are created in the root directory of the drive
  4052.         and are assigned unique names starting with "screen".
  4053. Learned from:    Posting by Matt Georgy <mgeorgy@vmsclst1.sc.csuopmona.edu>.
  4054. - ---------------------------------------------------------------------------
  4055. Effect:        Zap the PRAM (Parameter RAM).
  4056. How to obtain:    Hold COMMAND+OPTION+SHIFT while activating the control panel
  4057.         with the mouse.
  4058. Restrictions:    System 6.
  4059. Why use this:    This sometimes cures weird problems.
  4060. Learned from:    Walter <boodlums@aol.com>
  4061. - ---------------------------------------------------------------------------
  4062. Effect:        Cycle keyboard mappings.
  4063. How to obtain:    Hold COMMAND+OPTION+SPACE.
  4064. Restrictions:    System 7.
  4065. Why use this:    To switch to the appropriate keyboard mapping when you use
  4066.         several languages.
  4067.         To show the current keyboard in the menu bar edit the 'itlc'
  4068.         resource with ResEdit and turn "Show Keyboard Menu" on.
  4069. Learned from:    Paul Savage <paul.savage@carbon.chem.csiro.au>
  4070. - ---------------------------------------------------------------------------
  4071. Effect:        Format a floppy disk that has an un-repairable desktop file.
  4072. How to obtain:    Hold COMMAND+OPTION+SHIFT+TAB while inserting the floppy
  4073.         disk.
  4074. Restrictions:    None (known).
  4075. Why use this:    To re-use the floppy (and destroy all information currently
  4076.         stored on it).
  4077. Learned from:    Owen S. Nishioka <owen@olympus.arc.nasa.gov>
  4078. - ---------------------------------------------------------------------------
  4079.  
  4080. Please MAIL additions/corrections/suggestions to knop@duteca.et.tudelft.nl
  4081.  
  4082. If there is interest, I will maintain, correct and extend this list. I expect
  4083. that the "Restrictions:" lines are not 100% correct...
  4084.  
  4085. -- 
  4086.   _____       __  __  __  __   ____   _____   _____   ______  _____    _____ 
  4087.  |  _  \     |  |/  ||  \|  | /    \ |  _  \ |  _  \ |   ___||  _  \  /  ___|
  4088.  |   __/ _   |     < |      ||  ||  ||   __/ |   __/ |   >__ |     <  \__  \
  4089.  |__|   |_|  |__|\__||__|\__| \____/ |__|    |__|    |______||__|\__||_____/
  4090.   Delft University of Technology, The Netherlands, knop@duteca.et.tudelft.nl
  4091.  
  4092. +++++++++++++++++++++++++++
  4093.  
  4094. >From Frank Manshande <frankm@and.nl>
  4095. Date: Tue, 3 May 1994 07:07:15 GMT
  4096. Organization: AND Software BV
  4097.  
  4098. In article <2q3sn2$lj4@liberator.et.tudelft.nl> Peter Knoppers,
  4099. knop@duteca8.et.tudelft.nl writes:
  4100. >Effect:        Reset.
  4101. >How to obtain:    Type COMMAND+CONTROL+POWER
  4102. >                (power is the key with the triangle on it).
  4103. >Restrictions:    Macintosh LC or Macintosh IIsi (which don't have a restart
  4104. >                button).
  4105. >Why use this:    To restart a hung system.
  4106. >Learned from:    The Macintosh secret trick list, 16 April, 1992.
  4107.  
  4108. My Centris 660AV does the same, and I suspect all new Macintoshes can
  4109. do a restart using this key combination.
  4110.  
  4111. I missed pressing the POWER key seperately. On the Centris 660AV this
  4112. brings up a dialog asking the user if he or she wants to shutdown the
  4113. computer. This is the same with the Color Classic, and probably some
  4114. more Macs. It is also very logical to use the same key for starting up
  4115. a Mac as for shutting down (although you can't start up a Centris 660AV
  4116. this way, because it has a real power switch :( ).
  4117.  
  4118. The first computer I saw which used a key on the keyboard to shutdown
  4119. the computer was the NeXT.
  4120.  
  4121. Frank Manshande
  4122. frankm@and.nl
  4123. AND Software BV
  4124. Rotterdam, The Netherlands
  4125.  
  4126. +++++++++++++++++++++++++++
  4127.  
  4128. >From Bruce@hoult.actrix.gen.nz (Bruce Hoult)
  4129. Date: Fri, 6 May 1994 15:07:25 +1200 (NZST)
  4130. Organization: (none)
  4131.  
  4132. Frank Manshande <frankm@and.nl> writes:
  4133. > The first computer I saw which used a key on the keyboard to shutdown
  4134. > the computer was the NeXT.
  4135.  
  4136. It's not on the keyboard, but perhaps you never saw the Apple Lisa?
  4137.  
  4138. You hit the power switch, and it shut down all the applications and turned
  4139. off.  When you turned it back on, it opened all the applications and
  4140. documents again, just the way you left them...
  4141.  
  4142. +++++++++++++++++++++++++++
  4143.  
  4144. >From rarachel@poly.edu (Arsen Ray Arachelian)
  4145. Date: Fri, 6 May 1994 04:13:34 GMT
  4146. Organization: Polytechnic University, New York
  4147.  
  4148.  
  4149. : The first computer I saw which used a key on the keyboard to shutdown
  4150. : the computer was the NeXT.
  4151.  
  4152. Of course there was the Lisa with the Power switch inside the alcove where
  4153. the keyboard sat.  Not exactly on the keyboard, but certainly a soft-power
  4154. on/off switch.   First computer I ever saw that could shut itself off! :-)
  4155.  
  4156.  
  4157. +++++++++++++++++++++++++++
  4158.  
  4159. >From epenneba@ux1.cso.uiuc.edu (I never )
  4160. Date: 6 May 1994 18:01:27 GMT
  4161. Organization: University of Illinois at Urbana
  4162.  
  4163. Could someone please mail me the original updated list?  I must have missed 
  4164. it......
  4165.  
  4166. Thanks:)
  4167.  
  4168. -Erik
  4169.  
  4170. -- 
  4171. "Really ain't no use in me hanging around.... <><><> epenneba@ux1.cso.uiuc.edu
  4172.  Feeling sweet feelin', wish I could caress and kiss..."
  4173. These are not the opinions of CCSO.  I am the mouthpiece of Satan.
  4174.  
  4175. ---------------------------
  4176.  
  4177. End of C.S.M.P. Digest
  4178. **********************
  4179.  
  4180.  
  4181.  
  4182.